Class MetadataKey

java.lang.Object
org.openhab.core.common.AbstractUID
org.openhab.core.items.MetadataKey

@NonNullByDefault public final class MetadataKey extends AbstractUID
This class represents the key of a Metadata entity. It is a simple combination of a namespace and an item name.
Author:
Kai Kreuzer - Initial contribution
  • Constructor Details

    • MetadataKey

      public MetadataKey(String namespace, String itemName)
      Creates a new instance.
      Parameters:
      namespace - the namespace of this metadata key
      itemName - the item name that is associated with this metadata key
  • Method Details

    • getItemName

      public String getItemName()
      Provides the item name of this key
      Returns:
      the item name
    • getNamespace

      public String getNamespace()
      Provides the namespace of this key
      Returns:
      the namespace
    • getMinimalNumberOfSegments

      protected int getMinimalNumberOfSegments()
      Description copied from class: AbstractUID
      Specifies how many segments the UID has to have at least.
      Specified by:
      getMinimalNumberOfSegments in class AbstractUID
      Returns:
      the number of segments