Package org.eclipse.ecf.core.identity
Class StringID
- java.lang.Object
- 
- org.eclipse.ecf.core.identity.BaseID
- 
- org.eclipse.ecf.core.identity.StringID
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable,- Principal,- org.eclipse.core.runtime.IAdaptable,- ID
 - Direct Known Subclasses:
- GUID
 
 public class StringID extends BaseID A string-based identity- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classStringID.StringIDNamespace
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Object o)booleanequals(Object o)StringgetName()Get the unique name of this identity.NamespacegetNamespace()Get the Namespace instance associated with this identityinthashCode()protected intnamespaceCompareTo(BaseID obj)protected booleannamespaceEquals(BaseID obj)Called byNamespace.testIDEquals(BaseID, BaseID).protected StringnamespaceGetName()Called byNamespace.getNameForID(BaseID).protected intnamespaceHashCode()Called byNamespace.getHashCodeForID(BaseID).protected voidsetEmptyNamespace()StringtoExternalForm()Get this ID instance in String form.StringtoString()- 
Methods inherited from class org.eclipse.ecf.core.identity.BaseIDgetAdapter, namespaceToExternalForm
 
- 
 
- 
- 
- 
Field Detail- 
valueprotected String value 
 
- 
 - 
Method Detail- 
compareTopublic int compareTo(Object o) - Specified by:
- compareToin interface- Comparable
- Overrides:
- compareToin class- BaseID
 
 - 
equalspublic boolean equals(Object o) 
 - 
getNamepublic String getName() Description copied from interface:IDGet the unique name of this identity.
 - 
hashCodepublic int hashCode() 
 - 
getNamespacepublic Namespace getNamespace() Description copied from interface:IDGet the Namespace instance associated with this identity- Specified by:
- getNamespacein interface- ID
- Overrides:
- getNamespacein class- BaseID
- Returns:
- Namespace the Namespace corresponding to this identity. Will not return null.
 
 - 
toExternalFormpublic String toExternalForm() Description copied from interface:IDGet this ID instance in String form. Will not return null.- Specified by:
- toExternalFormin interface- ID
- Overrides:
- toExternalFormin class- BaseID
- Returns:
- String that is external representation of this ID
 
 - 
toStringpublic String toString() 
 - 
namespaceCompareToprotected int namespaceCompareTo(BaseID obj) Description copied from class:BaseID- Specified by:
- namespaceCompareToin class- BaseID
- Parameters:
- obj- the other ID to compare to. Will not be- null.
- Returns:
- the appropriate value as per Comparablecontract.
 
 - 
namespaceEqualsprotected boolean namespaceEquals(BaseID obj) Description copied from class:BaseIDCalled byNamespace.testIDEquals(BaseID, BaseID).- Specified by:
- namespaceEqualsin class- BaseID
- Parameters:
- obj- the other ID to test against. May be- null.
- Returns:
- trueif this ID is equal to the given ID.- falseotherwise.
 
 - 
namespaceGetNameprotected String namespaceGetName() Description copied from class:BaseIDCalled byNamespace.getNameForID(BaseID).- Specified by:
- namespaceGetNamein class- BaseID
- Returns:
- String name for this ID. Must not be null. Value returned should be unique within this Namespace.
 
 - 
namespaceHashCodeprotected int namespaceHashCode() Description copied from class:BaseIDCalled byNamespace.getHashCodeForID(BaseID).- Specified by:
- namespaceHashCodein class- BaseID
- Returns:
- int hashCode for this ID. Returned value must be unique within this process.
 
 - 
setEmptyNamespaceprotected void setEmptyNamespace() 
 
- 
 
-