Enum Class Key

All Implemented Interfaces:
Serializable, Comparable<Key>, Constable

public enum Key extends Enum<Key>
Enum representing keys in DefaultKeyTranslator
  • Enum Constant Details

    • UNTRANSLATABLE

      public static final Key UNTRANSLATABLE
    • ENTER

      public static final Key ENTER
    • BACKSPACE

      public static final Key BACKSPACE
    • SPACE

      public static final Key SPACE
    • UP

      public static final Key UP
    • DOWN

      public static final Key DOWN
    • LEFT

      public static final Key LEFT
  • Method Details

    • values

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

      public int getCode()
      Get the code of the key. Except for UNTRANSLATABLE, all others have the value 0 by default.
      Returns:
      the code of the key
    • untranslatable

      public static Key untranslatable(int code)
      Create an untranslatable key
      Parameters:
      code - - the code of the key
      Returns:
      the untranslatable key
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Key>