Class Metadata

java.lang.Object
org.openhab.core.items.Metadata
All Implemented Interfaces:
Identifiable<MetadataKey>

@NonNullByDefault public final class Metadata extends Object implements Identifiable<MetadataKey>
This is a data class for storing meta-data for a given item and namespace. It is the entity used for within the MetadataRegistry.
Author:
Kai Kreuzer - Initial contribution
  • Constructor Details

  • Method Details

    • getUID

      public MetadataKey getUID()
      Description copied from interface: Identifiable
      Get the unique identifier.
      Specified by:
      getUID in interface Identifiable<MetadataKey>
      Returns:
      the unique identifier
    • getConfiguration

      public Map<String,Object> getConfiguration()
      Provides the configuration meta-data.
      Returns:
      configuration as a map of key-value pairs
    • getValue

      public String getValue()
      Provides the main value of the meta-data.
      Returns:
      the main meta-data as a string
    • 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