Package org.openhab.core.thing
Class ThingUID
java.lang.Object
org.openhab.core.common.AbstractUID
org.openhab.core.thing.UID
org.openhab.core.thing.ThingUID
ThingUID
represents a unique identifier for things.- Author:
- Dennis Nobel - Initial contribution, Jochen Hiller - Bugfix 455434: added default constructor
-
Field Summary
Fields inherited from class org.openhab.core.common.AbstractUID
SEGMENT_PATTERN, SEPARATOR
-
Constructor Summary
ConstructorDescriptionInstantiates a new thing UID.Instantiates a new thing UID.Instantiates a new thing UID.Instantiates a new thing UID.Instantiates a new thing UID.ThingUID
(ThingTypeUID thingTypeUID, String id) Instantiates a new thing UID.ThingUID
(ThingTypeUID thingTypeUID, String id, String... bridgeIds) Instantiates a new thing UID.ThingUID
(ThingTypeUID thingTypeUID, ThingUID bridgeUID, String id) Instantiates a new thing UID. -
Method Summary
Modifier and TypeMethodDescriptionReturns the bridge ids.getId()
Returns the id.protected int
Specifies how many segments the UID has to have at least.Methods inherited from class org.openhab.core.thing.UID
equals, getAllSegments, getAsString, getBindingId, hashCode, toString
Methods inherited from class org.openhab.core.common.AbstractUID
getSegment, validateSegment
-
Constructor Details
-
ThingUID
Instantiates a new thing UID.- Parameters:
thingTypeUID
- the thing typeid
- the id
-
ThingUID
Instantiates a new thing UID.- Parameters:
thingTypeUID
- the thing typebridgeUID
- the bridge UID through which the thing is accessedid
- the id of the thing
-
ThingUID
Instantiates a new thing UID.- Parameters:
thingTypeUID
- the thing typeid
- the id
-
ThingUID
Instantiates a new thing UID.- Parameters:
bindingId
- the binding idid
- the id
-
ThingUID
Instantiates a new thing UID.- Parameters:
bindingId
- the binding idbridgeUID
- the bridge UID through which the thing is accessedid
- the id
-
ThingUID
Instantiates a new thing UID.- Parameters:
bindingId
- the binding idthingTypeId
- the thing type idid
- the id
-
ThingUID
Instantiates a new thing UID.- Parameters:
thingUID
- the thing UID
-
ThingUID
Instantiates a new thing UID.- Parameters:
segments
- segments
-
-
Method Details
-
getBridgeIds
Returns the bridge ids.- Returns:
- list of bridge ids
-
getId
Returns the id.- Returns:
- id the id
-
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
-