Enum Class Terminal.CharSetCapability

java.lang.Object
java.lang.Enum<Terminal.CharSetCapability>
org.refcodes.runtime.Terminal.CharSetCapability
All Implemented Interfaces:
Serializable, Comparable<Terminal.CharSetCapability>, Constable
Enclosing class:
Terminal

public static enum Terminal.CharSetCapability extends Enum<Terminal.CharSetCapability>
The Terminal.CharSetCapability defines three categories of character capabilities as observed on various platform. The method Terminal.toCharSetCapability() tries to determine at best will the capabilities of the current terminal session.
  • Enum Constant Details

    • UNICODE

      public static final Terminal.CharSetCapability UNICODE
      Congratulations, the terminal seems to be capable of unicode (UTF-8).
    • WINDOWS

      public static final Terminal.CharSetCapability WINDOWS
      A Windows terminal without (full) UTF-8 support. Make sure you also take Terminal.getLineBreak() into account as well as the odd line break behavior when being at the end of a line.
    • ASCII

      public static final Terminal.CharSetCapability ASCII
      The least common denominator which the current terminal session seems to be capable of.
  • Method Details

    • values

      public static Terminal.CharSetCapability[] 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 Terminal.CharSetCapability 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