public class UndiscoveredEggGroup extends BasicEggGroup
BasicEggGroup
that rejects all other egg groups as a partnerindex, name
Constructor and Description |
---|
UndiscoveredEggGroup() |
UndiscoveredEggGroup(int index,
java.lang.String name)
Basic constructor taking the index and the name
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBreed(Gender first,
Gender second)
Checks if the two
Gender |
boolean |
canBreedWith(EggGroup... others)
Checks if this egg group can breed with any of the given other egg groups
Will return true if a single one works
|
boolean |
canBreedWith(EggGroup other)
Checks if the other egg group can breed with this egg group
Make sure it is consistent in both directions (i.e.
|
boolean |
canBreedWith(java.util.List<EggGroup> others)
Checks if this egg group can breed with any of the given other egg groups
Will return true if a single one works
|
equals, hashCode
getIndex, getKey, getTranslationKey
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getLocalizedName, getTranslatedName
public UndiscoveredEggGroup(int index, java.lang.String name)
index
- The index of the egg groupname
- The name of the egg grouppublic UndiscoveredEggGroup()
public boolean canBreed(Gender first, Gender second)
EggGroup
Gender
canBreed
in interface EggGroup
canBreed
in class AbstractEggGroup
first
- The first gendersecond
- The second genderpublic boolean canBreedWith(java.util.List<EggGroup> others)
EggGroup
canBreedWith
in interface EggGroup
canBreedWith
in class AbstractEggGroup
others
- The egg groups being checkedpublic boolean canBreedWith(EggGroup... others)
EggGroup
canBreedWith
in interface EggGroup
canBreedWith
in class AbstractEggGroup
others
- The egg groups being checkedpublic boolean canBreedWith(EggGroup other)
EggGroup
canBreedWith
in interface EggGroup
canBreedWith
in class BasicEggGroup
other
- The other egg group to check