public interface Light
| Modifier and Type | Method | Description |
|---|---|---|
String |
getName() |
Returns the name of the light, as set by the user.
|
State |
getState() |
Gets the state of the light.
|
LightType |
getType() |
Returns info on the type of the light.
|
boolean |
isOn() |
Queries the light state.
|
boolean |
isReachable() |
Queries the reachability of the light.
|
void |
setBrightness(int brightness) |
Sets the brightness of the light.
|
void |
setState(State state) |
Sets a state for the light.
|
void |
turnOff() |
Turns the light off.
|
void |
turnOn() |
Turns the light on.
|
String getName()
void turnOn()
void turnOff()
boolean isOn()
boolean isReachable()
void setBrightness(int brightness)
0 turn it off.brightness - A value from 0 (minimum brightness) to 254 (maximum brightness).LightType getType()
void setState(State state)
state - A state to be set for this light.State getState()
Copyright © 2019. All rights reserved.