Class ButtonImpl

java.lang.Object
io.github.zeroone3010.yahueapi.v2.ButtonImpl
All Implemented Interfaces:
Button

public class ButtonImpl
extends Object
implements Button
  • Constructor Details

  • Method Details

    • getId

      public UUID getId()
      Description copied from interface: Button

      Returns the technical id of the button, as assigned by the Bridge.

      Specified by:
      getId in interface Button
      Returns:
      Id of the button.
    • getNumber

      public int getNumber()
      Description copied from interface: Button

      The number of this button in a switch.

      Specified by:
      getNumber in interface Button
      Returns:
      An integer describing the number of this button.
    • getOwner

      public Switch getOwner()
      Description copied from interface: Button
      Returns the Switch that this Button belongs to.
      Specified by:
      getOwner in interface Button
      Returns:
      The Switch that owns this button.
    • getLatestEvent

      public Optional<ButtonEventType> getLatestEvent()
      Description copied from interface: Button

      The latest event that this button has emitted.

      Specified by:
      getLatestEvent in interface Button
      Returns:
      An enumeration describing the latest event from this particular button. May be empty if this was not the last button to be pressed in its switch.
    • toString

      public String toString()
      Overrides:
      toString in class Object