Package net.solarnetwork.domain
Class DeviceOperatingStatus.EnumBuilder<C extends Enum<C> & Bitmaskable>
java.lang.Object
net.solarnetwork.domain.DeviceOperatingStatus.EnumBuilder<C>
- Enclosing class:
- DeviceOperatingStatus<C extends Bitmaskable>
public static final class DeviceOperatingStatus.EnumBuilder<C extends Enum<C> & Bitmaskable>
extends Object
Builder to build
DeviceOperatingStatus using an enum of device
state values.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new instance status instance from this builder.withDeviceStatesCode(int mask) Configure a states code.withState(DeviceOperatingState state) Configure a state value.withStateCode(int code) Configure a state code.
-
Method Details
-
withState
Configure a state value.- Parameters:
state- the state to set- Returns:
- this builder
-
withStateCode
Configure a state code.- Parameters:
code- the code to set- Returns:
- this instance
-
withDeviceStatesCode
Configure a states code.- Parameters:
mask- the mask to set- Returns:
- this instance
-
build
Create a new instance status instance from this builder.- Returns:
- the new instance
-