Class KeystrokeInput

    • Constructor Detail

      • KeystrokeInput

        public KeystrokeInput​(Key key,
                              Key... keys)
        Key and keys constructor.
        Parameters:
        key - The key that was pressed.
        keys - The keys that were pressed when this input occurred.
        Throws:
        java.lang.NullPointerException - if the given key and/or keys is null.
    • Method Detail

      • getKey

        public Key getKey()
        Returns:
        The key that was pressed.
      • hashCode

        public int hashCode()

        This version extends the hash code of the underlying objects with the the key.

        Overrides:
        hashCode in class com.globalmentor.model.AbstractHashObject
      • equals

        public boolean equals​(java.lang.Object object)

        Besides the default checks, this version ensures that the keys are equal.

        Overrides:
        equals in class com.globalmentor.model.AbstractHashObject
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class com.globalmentor.model.AbstractHashObject