Package sc2002.FCS1.grp2.builders
Enum Class Style.Code
- All Implemented Interfaces:
Serializable,Comparable<Style.Code>,Constable
- Enclosing class:
Style
Default ANSI Codes
I will not write documentation for each case, as it's pretty self-explanatory based on the enum name.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe ANSI ESC code that represents each trait of each code. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intgetCode()The ANSI code.static Style.CodeReturns the enum constant of this class with the specified name.static Style.Code[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOLD
-
ITALIC
-
UNDERLINE
-
STRIKETHROUGH
-
TEXT_BLACK
-
BACK_BLACK
-
TEXT_RED
-
BACK_RED
-
TEXT_GREEN
-
BACK_GREEN
-
TEXT_YELLOW
-
BACK_YELLOW
-
TEXT_BLUE
-
BACK_BLUE
-
TEXT_MAGENTA
-
BACK_MAGENTA
-
TEXT_CYAN
-
BACK_CYAN
-
TEXT_WHITE
-
BACK_WHITE
-
-
Field Details
-
code
private int codeThe ANSI ESC code that represents each trait of each code.
-
-
Constructor Details
-
Code
private Code(int code) Internally construct the enum value.- Parameters:
code- ANSI ESC code.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
int getCode()The ANSI code.
-