Class MouseClickInput

    • Constructor Detail

      • MouseClickInput

        public MouseClickInput​(MouseButton button,
                               int count,
                               Key... keys)
        Button and keys constructor.
        Parameters:
        button - The button that was clicked.
        count - The number of clicks that were input (e.g. 1 for a single click, 2 for a double click, etc.).
        keys - The keys that were pressed when this input occurred.
        Throws:
        java.lang.NullPointerException - if the given button and/or keys is null.
        java.lang.IllegalArgumentException - if the given count is zero or less.
    • Method Detail

      • getButton

        public MouseButton getButton()
        Returns:
        The button that was clicked.
      • getCount

        public int getCount()
        Returns:
        The number of clicks that were input (e.g. 1 for a single click, 2 for a double click, etc.).
      • hashCode

        public int hashCode()

        This version extends the hash code of the underlying objects with the the button and count.

        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 buttons are equal.

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

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