Enum UnDefType

  • All Implemented Interfaces:
    Serializable, Comparable<UnDefType>, PrimitiveType, State, Type

    public enum UnDefType
    extends Enum<UnDefType>
    implements PrimitiveType, State
    There are situations when item states do not have any defined value. This might be because they have not been initialized yet (never received a state update so far) or because their state is ambiguous (e.g. a dimmed light that is treated as a switch (ON/OFF) will have an undefined state if it is dimmed to 50%).
    Kai Kreuzer - Initial contribution
    • Enum Constant Detail

    • Method Detail

      • values

        public static UnDefType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (UnDefType c : UnDefType.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UnDefType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • format

        public String format​(String pattern)
        Description copied from interface: Type
        Formats the value of this type according to a pattern (see Formatter).
        Specified by:
        format in interface Type
        pattern - the pattern to use
        the formatted string
      • toFullString

        public String toFullString()
        Description copied from interface: Type
        Get a string representation that contains the whole internal representation of the type.

        The returned string could be consumed by the static 'valueOf(String)' method of the respective type to build a new type that is equal to this type.

        Specified by:
        toFullString in interface Type
        a full string representation of the type to be consumed by 'valueOf(String)'