public static class
LightSettings.Builder
extends Object
Public Method Summary
LightSettings |
build()
Builds a new
LightSettings instance from the fields set on this builder. |
LightSettings.Builder | |
LightSettings.Builder |
setColorFromString(String color)
Sets the lightSettingsColor value with a string.
|
LightSettings.Builder |
setLightOffDurationInMillis(long lightOffDurationInMillis)
Sets the light off duration in milliseconds.
|
LightSettings.Builder |
setLightOnDurationInMillis(long lightOnDurationInMillis)
Sets the light on duration in milliseconds.
|
Inherited Method Summary
Public Methods
public LightSettings build ()
Builds a new LightSettings
instance from the fields set on this builder.
Returns
- A non-null
LightSettings
.
Throws
IllegalArgumentException | If the volume value is out of range. |
---|
public LightSettings.Builder setColor (LightSettingsColor color)
Sets the lightSettingsColor value in the light settings.
Parameters
color | Color to be used in the light settings. |
---|
Returns
- This builder.
public LightSettings.Builder setColorFromString (String color)
Sets the lightSettingsColor value with a string.
Parameters
color | LightSettingsColor specified in the #rrggbb format. |
---|
Returns
- This builder.
public LightSettings.Builder setLightOffDurationInMillis (long lightOffDurationInMillis)
Sets the light off duration in milliseconds.
Parameters
lightOffDurationInMillis | The time duration in milliseconds for the LED light to be off. |
---|
Returns
- This builder.
public LightSettings.Builder setLightOnDurationInMillis (long lightOnDurationInMillis)
Sets the light on duration in milliseconds.
Parameters
lightOnDurationInMillis | The time duration in milliseconds for the LED light to be on. |
---|
Returns
- This builder.