Enum Class Style.Code

All Implemented Interfaces:
Serializable, Comparable<Style.Code>, Constable
Enclosing class:
Style

public static enum Style.Code extends Enum<Style.Code>
Default ANSI Codes I will not write documentation for each case, as it's pretty self-explanatory based on the enum name.
  • Enum Constant Details

    • BOLD

      public static final Style.Code BOLD
    • ITALIC

      public static final Style.Code ITALIC
    • UNDERLINE

      public static final Style.Code UNDERLINE
    • STRIKETHROUGH

      public static final Style.Code STRIKETHROUGH
    • TEXT_BLACK

      public static final Style.Code TEXT_BLACK
    • BACK_BLACK

      public static final Style.Code BACK_BLACK
    • TEXT_RED

      public static final Style.Code TEXT_RED
    • BACK_RED

      public static final Style.Code BACK_RED
    • TEXT_GREEN

      public static final Style.Code TEXT_GREEN
    • BACK_GREEN

      public static final Style.Code BACK_GREEN
    • TEXT_YELLOW

      public static final Style.Code TEXT_YELLOW
    • BACK_YELLOW

      public static final Style.Code BACK_YELLOW
    • TEXT_BLUE

      public static final Style.Code TEXT_BLUE
    • BACK_BLUE

      public static final Style.Code BACK_BLUE
    • TEXT_MAGENTA

      public static final Style.Code TEXT_MAGENTA
    • BACK_MAGENTA

      public static final Style.Code BACK_MAGENTA
    • TEXT_CYAN

      public static final Style.Code TEXT_CYAN
    • BACK_CYAN

      public static final Style.Code BACK_CYAN
    • TEXT_WHITE

      public static final Style.Code TEXT_WHITE
    • BACK_WHITE

      public static final Style.Code BACK_WHITE
  • Field Details

    • code

      private int code
      The 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

      public static Style.Code[] 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 Style.Code 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
    • getCode

      int getCode()
      The ANSI code.