public enum OccupantType extends java.lang.Enum<OccupantType>
Modifier and Type | Method and Description |
---|---|
static OccupantType |
fromInt(int i)
Convert the corresponding enum entry for this integer
|
static OccupantType |
fromString(java.lang.String s)
Transform a string into an occupant type
|
int |
toInt()
Convert an enum entry to an integer
|
java.lang.String |
toString()
Return the string representation of an entry.
|
static OccupantType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OccupantType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OccupantType NONE
public static final OccupantType HERBIVORE
public static final OccupantType CARNIVORE
public static final OccupantType WATER
public static OccupantType[] values()
for (OccupantType c : OccupantType.values()) System.out.println(c);
public static OccupantType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int toInt()
public static OccupantType fromInt(int i)
public java.lang.String toString()
toString
in class java.lang.Enum<OccupantType>
public static OccupantType fromString(java.lang.String s)