Enum Key

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Key>

    public enum Key
    extends java.lang.Enum<Key>
    Logical key identity. Printable input is reported as CHAR with the char in ch().
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Key valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Key[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • UP

        public static final Key UP
      • DOWN

        public static final Key DOWN
      • LEFT

        public static final Key LEFT
      • RIGHT

        public static final Key RIGHT
      • ENTER

        public static final Key ENTER
      • ESCAPE

        public static final Key ESCAPE
      • TAB

        public static final Key TAB
      • SHIFT_TAB

        public static final Key SHIFT_TAB
      • BACKSPACE

        public static final Key BACKSPACE
      • DELETE

        public static final Key DELETE
      • HOME

        public static final Key HOME
      • END

        public static final Key END
      • PAGE_UP

        public static final Key PAGE_UP
      • PAGE_DOWN

        public static final Key PAGE_DOWN
      • CHAR

        public static final Key CHAR
        A printable character; the character is carried in ch().
      • CTRL_TAB

        public static final Key CTRL_TAB
        Ctrl+Tab; recognized only where the terminal reports it.
      • UNKNOWN

        public static final Key UNKNOWN
        An unrecognized input sequence.
    • Method Detail

      • values

        public static Key[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Key c : Key.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Key valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null