Enum Constant and Description |
---|
AQUA |
BLACK |
BLUE |
BOLD |
DARK_AQUA |
DARK_BLUE |
DARK_GRAY |
DARK_GREEN |
DARK_PURPLE |
DARK_RED |
GOLD |
GRAY |
GREEN |
ITALIC |
LIGHT_PURPLE |
MAGIC |
RED |
RESET |
STRIKETHROUGH |
UNDERLINE |
WHITE |
YELLOW |
Modifier and Type | Method and Description |
---|---|
static Color |
fromCode(char code)
Returns the color associated with the given char code, or null if not
found.
|
char |
getCode()
Gets the code associated with this
Color . |
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.
|
public static final Color BLACK
public static final Color DARK_BLUE
public static final Color DARK_GREEN
public static final Color DARK_AQUA
public static final Color DARK_RED
public static final Color DARK_PURPLE
public static final Color GOLD
public static final Color GRAY
public static final Color DARK_GRAY
public static final Color BLUE
public static final Color GREEN
public static final Color AQUA
public static final Color RED
public static final Color LIGHT_PURPLE
public static final Color YELLOW
public static final Color WHITE
public static final Color MAGIC
public static final Color BOLD
public static final Color STRIKETHROUGH
public static final Color UNDERLINE
public static final Color ITALIC
public static final Color RESET
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 char getCode()
Color
.Color