public enum HorseColor extends Enum<HorseColor>
Enum Constant and Description |
---|
BLACK |
BROWN |
CHESTNUT |
CREAMY |
DARKBROWN |
GRAY |
WHITE |
Modifier and Type | Field and Description |
---|---|
private int |
index |
private static HorseColor[] |
VALUES |
Modifier and Type | Method and Description |
---|---|
static HorseColor |
byIndex(int index) |
int |
getIndex() |
static HorseColor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HorseColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HorseColor WHITE
public static final HorseColor CREAMY
public static final HorseColor CHESTNUT
public static final HorseColor BROWN
public static final HorseColor BLACK
public static final HorseColor GRAY
public static final HorseColor DARKBROWN
private static final HorseColor[] VALUES
private final int index
public static HorseColor[] values()
for (HorseColor c : HorseColor.values()) System.out.println(c);
public static HorseColor 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 getIndex()
public static HorseColor byIndex(int index)