Package org.eclipse.ecf.core.identity
Class BaseID
- java.lang.Object
- 
- org.eclipse.ecf.core.identity.BaseID
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable,- Principal,- org.eclipse.core.runtime.IAdaptable,- ID
 - Direct Known Subclasses:
- FileTransferID,- LongID,- R_OSGiID,- RemoteServiceID,- ServiceID,- ServiceTypeID,- StringID,- URIID,- UuID,- ZooDiscoveryTargetID
 
 public abstract class BaseID extends Object implements ID Base class for ID implementation classes Extensions for the org.eclipse.ecf.namespace extension point that expose new Namespace subclasses and their own ID implementations are recommended (but not required) to use this class as a superclass.- See Also:
- Serialized Form
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(Object o)booleanequals(Object o)ObjectgetAdapter(Class clazz)StringgetName()Get the unique name of this identity.NamespacegetNamespace()Get the Namespace instance associated with this identityinthashCode()protected abstract intnamespaceCompareTo(BaseID o)protected abstract booleannamespaceEquals(BaseID o)Called byNamespace.testIDEquals(BaseID, BaseID).protected abstract StringnamespaceGetName()Called byNamespace.getNameForID(BaseID).protected abstract intnamespaceHashCode()Called byNamespace.getHashCodeForID(BaseID).protected StringnamespaceToExternalForm()Called byNamespace.toExternalForm(BaseID).StringtoExternalForm()Get this ID instance in String form.
 
- 
- 
- 
Field Detail- 
namespaceprotected Namespace namespace 
 
- 
 - 
Constructor Detail- 
BaseIDpublic BaseID() - Since:
- 3.9
 
 - 
BaseIDprotected BaseID(Namespace namespace) 
 
- 
 - 
Method Detail- 
compareTopublic int compareTo(Object o) - Specified by:
- compareToin interface- Comparable
 
 - 
equalspublic boolean equals(Object o) 
 - 
getNamepublic String getName() Description copied from interface:IDGet the unique name of this identity.
 - 
getNamespacepublic Namespace getNamespace() Description copied from interface:IDGet the Namespace instance associated with this identity- Specified by:
- getNamespacein interface- ID
- Returns:
- Namespace the Namespace corresponding to this identity. Will not return null.
 
 - 
hashCodepublic int hashCode() 
 - 
toExternalFormpublic String toExternalForm() Description copied from interface:IDGet this ID instance in String form. Will not return null.- Specified by:
- toExternalFormin interface- ID
- Returns:
- String that is external representation of this ID
 
 - 
namespaceCompareToprotected abstract int namespaceCompareTo(BaseID o) - Parameters:
- o- the other ID to compare to. Will not be- null.
- Returns:
- the appropriate value as per Comparablecontract.
 
 - 
namespaceEqualsprotected abstract boolean namespaceEquals(BaseID o) Called byNamespace.testIDEquals(BaseID, BaseID).- Parameters:
- o- the other ID to test against. May be- null.
- Returns:
- trueif this ID is equal to the given ID.- falseotherwise.
 
 - 
namespaceGetNameprotected abstract String namespaceGetName() Called byNamespace.getNameForID(BaseID).- Returns:
- String name for this ID. Must not be null. Value returned should be unique within this Namespace.
 
 - 
namespaceHashCodeprotected abstract int namespaceHashCode() Called byNamespace.getHashCodeForID(BaseID).- Returns:
- int hashCode for this ID. Returned value must be unique within this process.
 
 - 
namespaceToExternalFormprotected String namespaceToExternalForm() Called byNamespace.toExternalForm(BaseID).- Returns:
- String that represents this ID. Default implementation is to return
 
         namespace.getScheme() + Namespace.SCHEME_SEPARATOR + namespaceGetName();
 
 
- 
 
-