Class ButtonImpl
java.lang.Object
io.github.zeroone3010.yahueapi.v2.ButtonImpl
- All Implemented Interfaces:
Button
public class ButtonImpl extends Object implements Button
-
Constructor Summary
Constructors Constructor Description ButtonImpl(Supplier<ButtonResource> stateProvider, ButtonResource buttonResource) -
Method Summary
Modifier and Type Method Description UUIDgetId()Returns the technical id of the button, as assigned by the Bridge.Optional<ButtonEventType>getLatestEvent()The latest event that this button has emitted.intgetNumber()The number of this button in a switch.SwitchgetOwner()Returns theSwitchthat thisButtonbelongs to.StringtoString()
-
Constructor Details
-
Method Details
-
getId
Description copied from interface:ButtonReturns the technical id of the button, as assigned by the Bridge.
-
getNumber
public int getNumber()Description copied from interface:ButtonThe number of this button in a switch.
-
getOwner
Description copied from interface:ButtonReturns theSwitchthat thisButtonbelongs to. -
getLatestEvent
Description copied from interface:ButtonThe latest event that this button has emitted.
- Specified by:
getLatestEventin interfaceButton- 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
-