java.io.Serializable
, java.lang.Comparable<Horse.Color>
public static enum Horse.Color extends java.lang.Enum<Horse.Color>
Enum Constant | 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 | Description |
---|---|---|
static Horse.Color |
valueOf(java.lang.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(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 nullCopyright © 2018. All rights reserved.