Class ButtonEvent

java.lang.Object
io.github.zeroone3010.yahueapi.ButtonEvent

public final class ButtonEvent
extends java.lang.Object

This class describes an event of a single button of a switch. Depending on the device in question, a button may only report when it is pushed down. Other kinds of devices will report the release of the button separately, and still some other devices may report whether the button was held down for a short period of time or a long period of time before it was released.

Every button event has a numeric event code, an integer. In case the device does not introduce all of its events to the Bridge, this library will not be able to know about those events and will report them as the UNKNOWN type. However, even in those cases one will be able to tell different UNKNOWN events apart by examining the eventCode.

  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  ButtonEvent.ButtonEventType
    An enumeration of the actions that a user may take with a physical button.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    int getEventCode()  
    ButtonEvent.ButtonEventType getEventType()  
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • getEventType

      public ButtonEvent.ButtonEventType getEventType()
    • getEventCode

      public int getEventCode()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object