Package textFormatter

Enum Class FormatOption

java.lang.Object
java.lang.Enum<FormatOption>
textFormatter.FormatOption
All Implemented Interfaces:
Serializable, Comparable<FormatOption>, Constable

public enum FormatOption extends Enum<FormatOption>
Enumerates the ANSI format codes that a terminal can normally display.

Please note that compatibility with all terminals may vary.

  • Enum Constant Details

    • RESET_ALL

      public static final FormatOption RESET_ALL
      Resets all formatting. Including colors.
    • BOLD

      public static final FormatOption BOLD
    • DIM

      public static final FormatOption DIM
      Makes the text dimmer.
    • ITALIC

      public static final FormatOption ITALIC
    • UNDERLINE

      public static final FormatOption UNDERLINE
    • REVERSE

      public static final FormatOption REVERSE
      Reverses the foreground and background colors.
    • HIDDEN

      public static final FormatOption HIDDEN
      Hides the text.
    • STRIKETHROUGH

      public static final FormatOption STRIKETHROUGH
  • Method Details

    • values

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

      @NotNull public @NotNull String toString()
      Returns the ANSI escape sequence for this format option.
      Overrides:
      toString in class Enum<FormatOption>
      Returns:
      The ANSI escape sequence for this format option.
      See Also:
    • seq

      @NotNull public @NotNull String seq()
      Returns the ANSI escape sequence for this format option.
      Returns:
      The ANSI escape sequence for this format option.
    • reset

      @NotNull public @NotNull String 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.