org.eclipse.ecf.core.identity
Class UuID

java.lang.Object
  extended by org.eclipse.ecf.core.identity.BaseID
      extended by org.eclipse.ecf.core.identity.UuID
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, java.security.Principal, org.eclipse.core.runtime.IAdaptable, ID

public class UuID
extends BaseID

Since:
3.5
See Also:
Serialized Form

Nested Class Summary
static class UuID.UuIDNamespace
           
 
Field Summary
protected  java.util.UUID uuid
           
 
Fields inherited from class org.eclipse.ecf.core.identity.BaseID
namespace
 
Constructor Summary
protected UuID(UuID.UuIDNamespace ns, java.util.UUID uuid)
           
 
Method Summary
 java.util.UUID getUUID()
           
protected  int namespaceCompareTo(BaseID obj)
          Called by Namespace.getCompareToForObject(BaseID, BaseID).
protected  boolean namespaceEquals(BaseID obj)
          Called by Namespace.testIDEquals(BaseID, BaseID).
protected  java.lang.String namespaceGetName()
          Called by Namespace.getNameForID(BaseID).
protected  int namespaceHashCode()
          Called by Namespace.getHashCodeForID(BaseID).
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ecf.core.identity.BaseID
compareTo, equals, getAdapter, getName, getNamespace, hashCode, namespaceToExternalForm, toExternalForm
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

uuid

protected final java.util.UUID uuid
Constructor Detail

UuID

protected UuID(UuID.UuIDNamespace ns,
               java.util.UUID uuid)
Method Detail

namespaceCompareTo

protected int namespaceCompareTo(BaseID obj)
Description copied from class: BaseID
Called by Namespace.getCompareToForObject(BaseID, BaseID).

Specified by:
namespaceCompareTo in class BaseID
Parameters:
obj - the other ID to compare to. Will not be null.
Returns:
the appropriate value as per Comparable contract.

namespaceEquals

protected boolean namespaceEquals(BaseID obj)
Description copied from class: BaseID
Called by Namespace.testIDEquals(BaseID, BaseID).

Specified by:
namespaceEquals in class BaseID
Parameters:
obj - the other ID to test against. May be null.
Returns:
true if this ID is equal to the given ID. false otherwise.

namespaceGetName

protected java.lang.String namespaceGetName()
Description copied from class: BaseID
Called by Namespace.getNameForID(BaseID).

Specified by:
namespaceGetName in class BaseID
Returns:
String name for this ID. Must not be null. Value returned should be unique within this Namespace.

namespaceHashCode

protected int namespaceHashCode()
Description copied from class: BaseID
Called by Namespace.getHashCodeForID(BaseID).

Specified by:
namespaceHashCode in class BaseID
Returns:
int hashCode for this ID. Returned value must be unique within this process.

getUUID

public java.util.UUID getUUID()

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object