Enum Constant and Description |
---|
BLACK |
BLUE |
BROWN |
CYAN |
GREEN |
GREY |
ORANGE |
PURPLE |
RED |
TEAL |
WHITE |
YELLOW |
Modifier and Type | Method and Description |
---|---|
int |
getId() |
int |
getValue() |
static Color |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Color[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static Color |
withId(int id) |
public static final Color RED
public static final Color BLUE
public static final Color TEAL
public static final Color PURPLE
public static final Color ORANGE
public static final Color BROWN
public static final Color WHITE
public static final Color YELLOW
public static final Color GREEN
public static final Color CYAN
public static final Color BLACK
public static final Color GREY
public static Color[] values()
for (Color c : Color.values()) System.out.println(c);
public static 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 nullpublic static Color withId(int id)
public int getId()
public int getValue()