Package org.openhab.core.thing
Class UID
java.lang.Object
org.openhab.core.common.AbstractUID
org.openhab.core.thing.UID
- Direct Known Subclasses:
ChannelGroupTypeUID
,ChannelGroupUID
,ChannelTypeUID
,ChannelUID
,ProfileTypeUID
,ThingTypeUID
,ThingUID
Base class for binding related unique identifiers.
A UID must always start with a binding ID.
- Author:
- Dennis Nobel - Initial contribution, Oliver Libutzki - Added possibility to define UIDs with variable amount of segments, Jochen Hiller - Bugfix 455434: added default constructor, object is now mutable
-
Field Summary
Fields inherited from class org.openhab.core.common.AbstractUID
SEPARATOR
-
Constructor Summary
-
Method Summary
Methods inherited from class org.openhab.core.common.AbstractUID
getMinimalNumberOfSegments, getSegment, isValid, validateSegment
-
Constructor Details
-
UID
public UID()For reflection only. Constructor must be public, otherwise it cannot be called by subclasses from another package. -
UID
Parses a UID for a given string. The UID must be in the format 'bindingId:segment:segment:...'.- Parameters:
uid
- uid in form a string
-
UID
Creates a UID for list of segments.- Parameters:
segments
- segments
-
UID
Creates a UID for list of segments.- Parameters:
segments
- segments
-
-
Method Details
-
getBindingId
Returns the binding id.- Returns:
- binding id
-
getAllSegments
- Overrides:
getAllSegments
in classAbstractUID
-
toString
- Overrides:
toString
in classAbstractUID
-
getAsString
- Overrides:
getAsString
in classAbstractUID
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractUID
-
equals
- Overrides:
equals
in classAbstractUID
-