| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_COLOR |
static String |
KEY_DENSITY |
static String |
KEY_ID |
static String |
KEY_STATUS |
KEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
LightState()
Constructs a new LightState object
|
LightState(Hashtable<String,Object> hash)
Constructs a new LightState object indicated by the Hashtable parameter
|
LightState(LightName id,
LightStatus status)
Constructs a newly allocated LightState object
|
| Modifier and Type | Method and Description |
|---|---|
RGBColor |
getColor()
Gets the color portion of the LightState class
|
Float |
getDensity()
Gets the density portion of the LightState class
|
LightName |
getId()
Gets the id portion of the LightState class
|
LightStatus |
getStatus()
Gets the status portion of the LightState class
|
LightState |
setColor(RGBColor color)
Sets the color portion of the LightState class
|
LightState |
setDensity(Float density)
Sets the density portion of the LightState class
|
LightState |
setId(LightName id)
Sets the id portion of the LightState class
|
LightState |
setStatus(LightStatus status)
Sets the status portion of the LightState class
|
clone, deserializeJSON, equals, format, formatObject, getBoolean, getBulkData, getDouble, getFloat, getInteger, getLong, getMessageTypeName, getObject, getStore, getStoreValue, getString, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_ID
public static final String KEY_STATUS
public static final String KEY_DENSITY
public static final String KEY_COLOR
public LightState()
public LightState(Hashtable<String,Object> hash)
Constructs a new LightState object indicated by the Hashtable parameter
hash - The Hashtable to usepublic LightState(@NonNull
LightName id,
@NonNull
LightStatus status)
id - The name of a light or a group of lights.status - Status of Light.public LightState setId(@NonNull LightName id)
id - The name of a light or a group of lights.public LightName getId()
public LightState setStatus(@NonNull LightStatus status)
status - enum value of type LightStatus that describes the specific lights stateLightStatuspublic LightStatus getStatus()
LightStatuspublic Float getDensity()
public LightState setDensity(Float density)
density - a float representation of the density of the specific light statepublic RGBColor getColor()
RGBColorpublic LightState setColor(RGBColor color)
color - an RGBColor representation of the color of this specific light stateRGBColor