public enum EnumFood extends java.lang.Enum<EnumFood> implements Sendable
JSON.Parser| Enum Constant and Description |
|---|
CITRUS |
DAIRY |
FEED |
FISH |
FRUIT |
GRAIN |
MEAT |
NUT |
OIL |
POULTRY |
SPECIAL |
VEGGIES |
| Modifier and Type | Field and Description |
|---|---|
static EnumFood[] |
CROP_FOODS
Array of all crop foods used in the game.
|
static EnumFood[] |
NON_CROP_FOODS
Array of all non-crop foods used in game.
|
static int |
SIZE |
| Modifier and Type | Method and Description |
|---|---|
void |
fromJSON(java.lang.Object doc)
Convert String into JSON
|
java.lang.String |
getIconPath265() |
java.lang.String |
getIconPath64() |
java.lang.String |
getType() |
abstract boolean |
isCrop()
Use when need to distinguish between crop and non-crop foods.
|
void |
setType(java.lang.String type) |
JSONDocument |
toJSON()
Convert class into json
|
java.lang.String |
toLongString() |
java.lang.String |
toString() |
static EnumFood |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EnumFood[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnumFood CITRUS
public static final EnumFood FRUIT
public static final EnumFood NUT
public static final EnumFood GRAIN
public static final EnumFood OIL
public static final EnumFood VEGGIES
public static final EnumFood SPECIAL
public static final EnumFood FEED
public static final EnumFood FISH
public static final EnumFood MEAT
public static final EnumFood POULTRY
public static final EnumFood DAIRY
public static final EnumFood[] CROP_FOODS
public static final EnumFood[] NON_CROP_FOODS
public static final int SIZE
public static EnumFood[] values()
for (EnumFood c : EnumFood.values()) System.out.println(c);
public static EnumFood 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 java.lang.String toString()
toString in class java.lang.Enum<EnumFood>public java.lang.String toLongString()
public java.lang.String getIconPath64()
public java.lang.String getIconPath265()
public JSONDocument toJSON()
JSONpublic void fromJSON(java.lang.Object doc)
JSONpublic abstract boolean isCrop()