Package com.pi4j.util
Enum ConsoleColor
- java.lang.Object
-
- java.lang.Enum<ConsoleColor>
-
- com.pi4j.util.ConsoleColor
-
- All Implemented Interfaces:
Serializable
,Comparable<ConsoleColor>
public enum ConsoleColor extends Enum<ConsoleColor>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CharSequence
build(boolean reset, Object... data)
static CharSequence
build(ConsoleColor color, boolean reset, Object... data)
static CharSequence
build(ConsoleColor color, Object... data)
CharSequence
build(Object... data)
static CharSequence
conditional(boolean condition, ConsoleColor positive, ConsoleColor negative, Object... data)
String
getEscapeSequence()
String
toString()
String
toString(Object... data)
static ConsoleColor
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConsoleColor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RESET
public static final ConsoleColor RESET
-
BLACK
public static final ConsoleColor BLACK
-
RED
public static final ConsoleColor RED
-
GREEN
public static final ConsoleColor GREEN
-
YELLOW
public static final ConsoleColor YELLOW
-
BLUE
public static final ConsoleColor BLUE
-
MAGENTA
public static final ConsoleColor MAGENTA
-
CYAN
public static final ConsoleColor CYAN
-
WHITE
public static final ConsoleColor WHITE
-
-
Method Detail
-
values
public static ConsoleColor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConsoleColor c : ConsoleColor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConsoleColor valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
build
public static CharSequence build(ConsoleColor color, Object... data)
-
build
public static CharSequence build(ConsoleColor color, boolean reset, Object... data)
-
conditional
public static CharSequence conditional(boolean condition, ConsoleColor positive, ConsoleColor negative, Object... data)
-
toString
public String toString()
- Overrides:
toString
in classEnum<ConsoleColor>
-
getEscapeSequence
public String getEscapeSequence()
-
build
public CharSequence build(Object... data)
-
build
public CharSequence build(boolean reset, Object... data)
-
-