Enum Class TerminalEncoding
- All Implemented Interfaces:
Serializable
,Comparable<TerminalEncoding>
,Constable
The ANSI escape codes supported by the terminal.
-
Nested Class Summary
Nested classes/interfaces declared in class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe terminal does not support any colors.The terminal supports 16 million colors.The terminal supports 16 colors.The terminal supports 256 colors.The terminal supports 8 colors. -
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator
<TerminalEncoding> Returns a comparator that sorts encodings based on the number of colors that they support, from the most to the least number of colors.static TerminalEncoding
Returns the enum constant of this class with the specified name.static TerminalEncoding[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods declared in class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
NONE
The terminal does not support any colors. -
XTERM_8_COLORS
The terminal supports 8 colors. -
XTERM_16_COLORS
The terminal supports 16 colors. -
XTERM_256_COLORS
The terminal supports 256 colors. -
RGB_888_COLORS
The terminal supports 16 million colors.
-
-
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
-
sortByDecreasingRank
Returns a comparator that sorts encodings based on the number of colors that they support, from the most to the least number of colors.- Returns:
- a negative number if
first
supports more colors thansecond
,0
if they support the same number of colors, and a positive number ifsecond
supports more colors thanfirst
-