- All Implemented Interfaces:
Serializable
,Comparable<FormatOption>
,Constable
Enumerates the ANSI format codes that a terminal can normally display.
Please note that compatibility with all terminals may vary.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
reset()
Returns the ANSI escape sequence which resets the formatting of this option.@NotNull String
seq()
Returns the ANSI escape sequence for this format option.@NotNull String
toString()
Returns the ANSI escape sequence for this format option.static FormatOption
Returns the enum constant of this class with the specified name.static FormatOption[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RESET_ALL
Resets all formatting. Including colors. -
BOLD
-
DIM
Makes the text dimmer. -
ITALIC
-
UNDERLINE
-
BLINK
Makes the text blink. -
REVERSE
Reverses the foreground and background colors. -
HIDDEN
Hides the text. -
STRIKETHROUGH
-
-
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
-
toString
Returns the ANSI escape sequence for this format option.- Overrides:
toString
in classEnum<FormatOption>
- Returns:
- The ANSI escape sequence for this format option.
- See Also:
-
seq
Returns the ANSI escape sequence for this format option.- Returns:
- The ANSI escape sequence for this format option.
-
reset
Returns the ANSI escape sequence which resets the formatting of this option.- Returns:
- The ANSI escape sequence which resets the formatting of this option.
-