Class StateOption

java.lang.Object
org.openhab.core.types.StateOption

@NonNullByDefault public final class StateOption extends Object
Describes one possible value an item might have.
Author:
Dennis Nobel - Initial contribution
  • Constructor Details

    • StateOption

      public StateOption(String value, @Nullable String label)
      Creates a StateOption object.
      Parameters:
      value - the value of the item
      label - label
  • Method Details

    • getLabel

      public @Nullable String getLabel()
      Returns the label.
      Returns:
      label
    • getValue

      public String getValue()
      Returns the value.
      Returns:
      value
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object