Package io.github.zeroone3010.yahueapi
Interface StateBuilderSteps.OnOffStep
- All Known Subinterfaces:
StateBuilderSteps.BuildStep
- All Known Implementing Classes:
State.Builder
- Enclosing class:
- StateBuilderSteps
public static interface StateBuilderSteps.OnOffStep
-
Method Summary
Modifier and Type Method Description default StatekeepCurrentState()Keeps the current state of the light to which this state is assigned: if it's on, it stays on, and if it's off, it stays off.default Stateoff()Creates a newStatethat will turn off the light to which it is assigned.default Stateon()Creates a newStatethat will turn on the light to which it is assigned.Stateon(java.lang.Boolean on)
-
Method Details
-
on
-
on
Creates a newStatethat will turn on the light to which it is assigned. A shorthand method foron(true). Avoid calling in vain if you know the light is on already.- Returns:
- A new
State.
-
off
Creates a newStatethat will turn off the light to which it is assigned. A shorthand method foron(false).- Returns:
- A new
State.
-
keepCurrentState
Keeps the current state of the light to which this state is assigned: if it's on, it stays on, and if it's off, it stays off. A shorthand method foron(null).- Returns:
- A new
State.
-