public static enum Horse.Color extends Enum<Horse.Color>
Enum Constant and Description |
---|
BLACK
Pitch black
|
BROWN
Light brown
|
CHESTNUT
Chestnut
|
CREAMY
Very light brown
|
DARK_BROWN
Dark brown
|
GRAY
Gray
|
WHITE
Snow white
|
Modifier and Type | Method and Description |
---|---|
static Horse.Color |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Horse.Color[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Horse.Color WHITE
public static final Horse.Color CREAMY
public static final Horse.Color CHESTNUT
public static final Horse.Color BROWN
public static final Horse.Color BLACK
public static final Horse.Color GRAY
public static final Horse.Color DARK_BROWN
public static Horse.Color[] values()
for (Horse.Color c : Horse.Color.values()) System.out.println(c);
public static Horse.Color 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 nullCopyright © 2022. All rights reserved.