Module com.github.rvesse.airline.io
Enum BasicDecoration
- java.lang.Object
-
- java.lang.Enum<BasicDecoration>
-
- com.github.rvesse.airline.io.decorations.BasicDecoration
-
- All Implemented Interfaces:
AnsiDecorationProvider
,java.io.Serializable
,java.lang.Comparable<BasicDecoration>
public enum BasicDecoration extends java.lang.Enum<BasicDecoration> implements AnsiDecorationProvider
Support for the basic ANSI decorations
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLINK_RAPID
BLINK_SLOW
BOLD
CONCEAL
FAINT
IMAGE_NEGATIVE
ITALIC
STRIKE_THROUGH
UNDERLINE
-
Field Summary
Fields Modifier and Type Field Description private int
disableCode
private int
enableCode
private java.lang.String
name
-
Constructor Summary
Constructors Modifier Constructor Description private
BasicDecoration(int enable, int disable, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
getAnsiControlCode(int code)
java.lang.String
getAnsiDecorationDisabledControlCode()
Gets the ANSI control code for disabling a decorationjava.lang.String
getAnsiDecorationEnabledControlCode()
Gets the ANSI control code for enabling a decorationjava.lang.String
toString()
static BasicDecoration
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BasicDecoration[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOLD
public static final BasicDecoration BOLD
-
FAINT
public static final BasicDecoration FAINT
-
ITALIC
public static final BasicDecoration ITALIC
-
UNDERLINE
public static final BasicDecoration UNDERLINE
-
BLINK_SLOW
public static final BasicDecoration BLINK_SLOW
-
BLINK_RAPID
public static final BasicDecoration BLINK_RAPID
-
IMAGE_NEGATIVE
public static final BasicDecoration IMAGE_NEGATIVE
-
CONCEAL
public static final BasicDecoration CONCEAL
-
STRIKE_THROUGH
public static final BasicDecoration STRIKE_THROUGH
-
-
Method Detail
-
values
public static BasicDecoration[] 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 (BasicDecoration c : BasicDecoration.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BasicDecoration valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<BasicDecoration>
-
getAnsiDecorationEnabledControlCode
public java.lang.String getAnsiDecorationEnabledControlCode()
Description copied from interface:AnsiDecorationProvider
Gets the ANSI control code for enabling a decoration- Specified by:
getAnsiDecorationEnabledControlCode
in interfaceAnsiDecorationProvider
- Returns:
- Control code
-
getAnsiDecorationDisabledControlCode
public java.lang.String getAnsiDecorationDisabledControlCode()
Description copied from interface:AnsiDecorationProvider
Gets the ANSI control code for disabling a decoration- Specified by:
getAnsiDecorationDisabledControlCode
in interfaceAnsiDecorationProvider
- Returns:
- Control Code
-
getAnsiControlCode
private java.lang.String getAnsiControlCode(int code)
-
-