Package org.openhab.core.common
Class AbstractUID
java.lang.Object
org.openhab.core.common.AbstractUID
- Direct Known Subclasses:
- MetadataKey,- UID
A non specific base class for unique identifiers.
- Author:
- Markus Rathgeb - Initial contribution
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor must be protected, otherwise it can not be called by subclasses from another package.protectedAbstractUID(String uid) Parses a UID for a given string.protectedAbstractUID(String... segments) Creates an AbstractUID for a list of segments.protectedAbstractUID(List<String> segments) Creates a UID for list of segments.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanprotected abstract intSpecifies how many segments the UID has to have at least.protected StringgetSegment(int segment) inthashCode()static booleantoString()protected voidvalidateSegment(String segment, int index, int length) 
- 
Field Details- 
SEPARATOR- See Also:
 
 
- 
- 
Constructor Details- 
AbstractUIDprotected AbstractUID()Constructor must be protected, otherwise it can not be called by subclasses from another package.
- 
AbstractUIDParses a UID for a given string. The UID must be in the format 'bindingId:segment:segment:...'.- Parameters:
- uid- uid in form a string
 
- 
AbstractUIDCreates an AbstractUID for a list of segments.- Parameters:
- segments- the id segments
 
- 
AbstractUIDCreates a UID for list of segments.- Parameters:
- segments- segments
 
 
- 
- 
Method Details- 
getMinimalNumberOfSegmentsprotected abstract int getMinimalNumberOfSegments()Specifies how many segments the UID has to have at least.- Returns:
- the number of segments
 
- 
getAllSegments
- 
getSegment
- 
isValid
- 
validateSegment
- 
toString
- 
getAsString
- 
hashCodepublic int hashCode()
- 
equals
 
-