Class SwitchImpl
java.lang.Object
io.github.zeroone3010.yahueapi.v2.SwitchImpl
public class SwitchImpl extends Object implements Switch
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Map<UUID,Button>getButtons()Lists the buttons of this switch.UUIDgetId()Returns the technical id of the switch, as assigned by the Bridge.Optional<Button>getLatestPressedButton()The latest button that was pressed.StringgetName()Returns the name of the switch, as set by the user.StringtoString()
-
Constructor Details
-
Method Details
-
getId
Description copied from interface:SwitchReturns the technical id of the switch, as assigned by the Bridge. The id stays the same even if the switch name is changed by the user.
-
getButtons
Description copied from interface:SwitchLists the buttons of this switch.- Specified by:
getButtonsin interfaceSwitch- Returns:
- A map of buttons on this switch, keys being the UUIDs of the buttons.
-
getName
Description copied from interface:SwitchReturns the name of the switch, as set by the user. -
getLatestPressedButton
Description copied from interface:SwitchThe latest button that was pressed. Use
Button.getLatestEvent()for the exact event then. The resultingOptional<ButtonEventType>is guaranteed to have a value if thisOptional<Button>has a value.- Specified by:
getLatestPressedButtonin interfaceSwitch- Returns:
- May be empty if no button has been pressed on this switch.
-
toString
-