Package net.solarnetwork.domain
Enum Class DeviceOperatingState
- All Implemented Interfaces:
Serializable,Comparable<DeviceOperatingState>,Constable,Bitmaskable
An enumeration of standardized device operating states.
- Since:
- 1.50
- Version:
- 1.0
- Author:
- matt
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.solarnetwork.domain.Bitmaskable
Bitmaskable.BitmaskableTypeSort -
Enum Constant Summary
Enum Constants -
Field Summary
Fields inherited from interface net.solarnetwork.domain.Bitmaskable
SORT_BY_TYPE -
Method Summary
Modifier and TypeMethodDescriptionintGet the bit offset.static DeviceOperatingStateforCode(int code) Get an enum for a code value.intgetCode()Get the code for this condition.static DeviceOperatingStateReturns the enum constant of this class with the specified name.static DeviceOperatingState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Unknown
An unknown state. -
Normal
Normal operating state. -
Starting
A startup/initializing state. -
Standby
A standby/low power state. -
Shutdown
A shutdown/off state. -
Fault
A faulty state. -
Disabled
A disabled state. -
Recovery
A recovery state. -
Override
An overridden state.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode()Get the code for this condition.- Returns:
- the code
-
bitmaskBitOffset
public int bitmaskBitOffset()Description copied from interface:BitmaskableGet the bit offset.- Specified by:
bitmaskBitOffsetin interfaceBitmaskable- Returns:
- offset, starting from 0 for the right-most bit
-
forCode
Get an enum for a code value.- Parameters:
code- the code to get an enum for- Returns:
- the enum with the given
code, or null ifcodeis 0 - Throws:
IllegalArgumentException- ifcodeis not supported
-