Class ThingUID


@NonNullByDefault public class ThingUID extends UID
ThingUID represents a unique identifier for things.
Author:
Dennis Nobel - Initial contribution, Jochen Hiller - Bugfix 455434: added default constructor
  • Constructor Details

    • ThingUID

      public ThingUID(ThingTypeUID thingTypeUID, String id)
      Instantiates a new thing UID.
      Parameters:
      thingTypeUID - the thing type
      id - the id
    • ThingUID

      public ThingUID(ThingTypeUID thingTypeUID, ThingUID bridgeUID, String id)
      Instantiates a new thing UID.
      Parameters:
      thingTypeUID - the thing type
      bridgeUID - the bridge UID through which the thing is accessed
      id - the id of the thing
    • ThingUID

      public ThingUID(ThingTypeUID thingTypeUID, String id, String... bridgeIds)
      Instantiates a new thing UID.
      Parameters:
      thingTypeUID - the thing type
      id - the id
    • ThingUID

      public ThingUID(String bindingId, String id)
      Instantiates a new thing UID.
      Parameters:
      bindingId - the binding id
      id - the id
    • ThingUID

      public ThingUID(String bindingId, ThingUID bridgeUID, String id)
      Instantiates a new thing UID.
      Parameters:
      bindingId - the binding id
      bridgeUID - the bridge UID through which the thing is accessed
      id - the id
    • ThingUID

      public ThingUID(String bindingId, String thingTypeId, String id)
      Instantiates a new thing UID.
      Parameters:
      bindingId - the binding id
      thingTypeId - the thing type id
      id - the id
    • ThingUID

      public ThingUID(String thingUID)
      Instantiates a new thing UID.
      Parameters:
      thingUID - the thing UID
    • ThingUID

      public ThingUID(String... segments)
      Instantiates a new thing UID.
      Parameters:
      segments - segments
  • Method Details

    • getBridgeIds

      public List<String> getBridgeIds()
      Returns the bridge ids.
      Returns:
      list of bridge ids
    • getId

      public String 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 class AbstractUID
      Returns:
      the number of segments