public abstract class BaseID extends java.lang.Object implements ID
Modifier | Constructor and Description |
---|---|
protected |
BaseID() |
protected |
BaseID(Namespace namespace) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object o) |
java.lang.Object |
getAdapter(java.lang.Class clazz) |
java.lang.String |
getName()
Get the unique name of this identity.
|
Namespace |
getNamespace()
Get the Namespace instance associated with this identity
|
int |
hashCode() |
protected abstract int |
namespaceCompareTo(BaseID o)
|
protected abstract boolean |
namespaceEquals(BaseID o)
Called by
Namespace.testIDEquals(BaseID, BaseID) . |
protected abstract java.lang.String |
namespaceGetName()
Called by
Namespace.getNameForID(BaseID) . |
protected abstract int |
namespaceHashCode()
Called by
Namespace.getHashCodeForID(BaseID) . |
protected java.lang.String |
namespaceToExternalForm()
Called by
Namespace.toExternalForm(BaseID) . |
java.lang.String |
toExternalForm()
Get this ID instance in String form.
|
protected Namespace namespace
protected BaseID()
protected BaseID(Namespace namespace)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object o)
public java.lang.String getName()
ID
public Namespace getNamespace()
ID
getNamespace
in interface ID
public int hashCode()
public java.lang.String toExternalForm()
ID
toExternalForm
in interface ID
protected abstract int namespaceCompareTo(BaseID o)
o
- the other ID to compare to. Will not be null
.Comparable
contract.protected abstract boolean namespaceEquals(BaseID o)
Namespace.testIDEquals(BaseID, BaseID)
.o
- the other ID to test against. May be null
.true
if this ID is equal to the given ID.
false
otherwise.protected abstract java.lang.String namespaceGetName()
Namespace.getNameForID(BaseID)
.null
. Value
returned should be unique within this Namespace.protected abstract int namespaceHashCode()
Namespace.getHashCodeForID(BaseID)
.protected java.lang.String namespaceToExternalForm()
Namespace.toExternalForm(BaseID)
.namespace.getScheme() + Namespace.SCHEME_SEPARATOR + namespaceGetName();
public java.lang.Object getAdapter(java.lang.Class clazz)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable