Package org.openhab.core.items
Class MetadataKey
java.lang.Object
org.openhab.core.common.AbstractUID
org.openhab.core.items.MetadataKey
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
-
Field Summary
Fields inherited from class org.openhab.core.common.AbstractUID
SEGMENT_PATTERN, SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionProvides the item name of this keyprotected int
Specifies how many segments the UID has to have at least.Provides the namespace of this keyMethods inherited from class org.openhab.core.common.AbstractUID
equals, getAllSegments, getAsString, getSegment, hashCode, toString, validateSegment
-
Constructor Details
-
MetadataKey
Creates a new instance.- Parameters:
namespace
- the namespace of this metadata keyitemName
- the item name that is associated with this metadata key
-
-
Method Details
-
getItemName
Provides the item name of this key- Returns:
- the item name
-
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 classAbstractUID
- Returns:
- the number of segments
-