public static enum PandaEntity.Gene extends Enum<PandaEntity.Gene>
Enum Constant and Description |
---|
AGGRESSIVE |
BROWN |
LAZY |
NORMAL |
PLAYFUL |
WEAK |
WORRIED |
Modifier and Type | Field and Description |
---|---|
private int |
id |
private String |
name |
private boolean |
recessive |
private static PandaEntity.Gene[] |
VALUES |
Modifier and Type | Method and Description |
---|---|
static PandaEntity.Gene |
byId(int id) |
static PandaEntity.Gene |
byName(String name) |
static PandaEntity.Gene |
createRandom(Random random) |
int |
getId() |
String |
getName() |
private static PandaEntity.Gene |
getProductGene(PandaEntity.Gene mainGene,
PandaEntity.Gene hiddenGene) |
boolean |
isRecessive() |
static PandaEntity.Gene |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PandaEntity.Gene[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PandaEntity.Gene NORMAL
public static final PandaEntity.Gene LAZY
public static final PandaEntity.Gene WORRIED
public static final PandaEntity.Gene PLAYFUL
public static final PandaEntity.Gene BROWN
public static final PandaEntity.Gene WEAK
public static final PandaEntity.Gene AGGRESSIVE
private static final PandaEntity.Gene[] VALUES
private final int id
private final String name
private final boolean recessive
public static PandaEntity.Gene[] values()
for (PandaEntity.Gene c : PandaEntity.Gene.values()) System.out.println(c);
public static PandaEntity.Gene valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getId()
public String getName()
public boolean isRecessive()
private static PandaEntity.Gene getProductGene(PandaEntity.Gene mainGene, PandaEntity.Gene hiddenGene)
public static PandaEntity.Gene byId(int id)
public static PandaEntity.Gene byName(String name)
public static PandaEntity.Gene createRandom(Random random)