orca.util
Class ID

java.lang.Object
  extended by orca.util.ID
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<ID>
Direct Known Subclasses:
NodeID, ReservationID, SliceID

public class ID
extends java.lang.Object
implements java.lang.Cloneable, java.lang.Comparable<ID>

This class represents an identifier. It can be used to create a globally unique identifier or to wrap an existing string to be used as an identifier. This class can be moved to another package and used anywhere we need unique identifiers

Author:
aydan

Field Summary
protected  java.lang.String id
          The underlying string representing this identifier
 
Constructor Summary
ID()
          Creates a new globally unique identifier
ID(java.lang.String id)
          Loads the specified string as an identifier
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(ID id)
           
 boolean equals(java.lang.Object other)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
The underlying string representing this identifier

Constructor Detail

ID

public ID()
Creates a new globally unique identifier


ID

public ID(java.lang.String id)
Loads the specified string as an identifier

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

compareTo

public int compareTo(ID id)
Specified by:
compareTo in interface java.lang.Comparable<ID>


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.