Enum Class DeviceOperatingState

java.lang.Object
java.lang.Enum<DeviceOperatingState>
net.solarnetwork.domain.DeviceOperatingState
All Implemented Interfaces:
Serializable, Comparable<DeviceOperatingState>, Constable, Bitmaskable

public enum DeviceOperatingState extends Enum<DeviceOperatingState> implements Bitmaskable
An enumeration of standardized device operating states.
Since:
1.50
Version:
1.0
Author:
matt
  • Enum Constant Details

  • Method Details

    • values

      public static DeviceOperatingState[] 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

      public static DeviceOperatingState valueOf(String name)
      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 name
      NullPointerException - 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: Bitmaskable
      Get the bit offset.
      Specified by:
      bitmaskBitOffset in interface Bitmaskable
      Returns:
      offset, starting from 0 for the right-most bit
    • forCode

      public static DeviceOperatingState forCode(int code)
      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 if code is 0
      Throws:
      IllegalArgumentException - if code is not supported