Enum Class BasicDecoration

java.lang.Object
java.lang.Enum<BasicDecoration>
com.github.rvesse.airline.io.decorations.BasicDecoration
All Implemented Interfaces:
AnsiDecorationProvider, Serializable, Comparable<BasicDecoration>, Constable

public enum BasicDecoration extends Enum<BasicDecoration> implements AnsiDecorationProvider
Support for the basic ANSI decorations
  • Enum Constant Details

  • Field Details

    • enableCode

      private final int enableCode
    • disableCode

      private final int disableCode
    • name

      private final String name
  • Constructor Details

    • BasicDecoration

      private BasicDecoration(int enable, int disable, String name)
  • Method Details

    • values

      public static BasicDecoration[] 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

      public static BasicDecoration valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<BasicDecoration>
    • getAnsiDecorationEnabledControlCode

      public String getAnsiDecorationEnabledControlCode()
      Description copied from interface: AnsiDecorationProvider
      Gets the ANSI control code for enabling a decoration
      Specified by:
      getAnsiDecorationEnabledControlCode in interface AnsiDecorationProvider
      Returns:
      Control code
    • getAnsiDecorationDisabledControlCode

      public String getAnsiDecorationDisabledControlCode()
      Description copied from interface: AnsiDecorationProvider
      Gets the ANSI control code for disabling a decoration
      Specified by:
      getAnsiDecorationDisabledControlCode in interface AnsiDecorationProvider
      Returns:
      Control Code
    • getAnsiControlCode

      private String getAnsiControlCode(int code)