Enum Constant and Description |
---|
BLACK |
BLUE |
BOLD_GREEN |
BOLD_RED |
BRIGHT_BLACK |
BRIGHT_BLUE |
BRIGHT_BOLD_GREEN |
BRIGHT_BOLD_RED |
BRIGHT_BOLD_YELLOW |
BRIGHT_CYAN |
BRIGHT_GREEN |
BRIGHT_MAGENTA |
BRIGHT_RED |
BRIGHT_WHITE |
BRIGHT_YELLOW |
CYAN |
GREEN |
MAGENTA |
RED |
WHITE |
YELLOW |
Modifier and Type | Method and Description |
---|---|
void |
err(java.lang.String message)
Prints to stderr using the Color if ANSI colors are enabled.
|
void |
out(java.lang.String message)
Prints to stdout using the Color if ANSI colors are enabled.
|
static Colors |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Colors[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
write(java.util.function.Consumer<java.lang.String> consumer,
java.lang.String message)
Writes the color output to the given consumer.
|
public static final Colors BLACK
public static final Colors RED
public static final Colors BOLD_RED
public static final Colors GREEN
public static final Colors BOLD_GREEN
public static final Colors YELLOW
public static final Colors BLUE
public static final Colors MAGENTA
public static final Colors CYAN
public static final Colors WHITE
public static final Colors BRIGHT_BLACK
public static final Colors BRIGHT_RED
public static final Colors BRIGHT_BOLD_RED
public static final Colors BRIGHT_GREEN
public static final Colors BRIGHT_BOLD_GREEN
public static final Colors BRIGHT_YELLOW
public static final Colors BRIGHT_BOLD_YELLOW
public static final Colors BRIGHT_BLUE
public static final Colors BRIGHT_MAGENTA
public static final Colors BRIGHT_CYAN
public static final Colors BRIGHT_WHITE
public static Colors[] values()
for (Colors c : Colors.values()) System.out.println(c);
public static Colors 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 void out(java.lang.String message)
message
- Message to print.public void err(java.lang.String message)
message
- Message to print.public void write(java.util.function.Consumer<java.lang.String> consumer, java.lang.String message)
consumer
- Consume to invoke.message
- Message to write.