com.ibm.aglet
Class AgletID

java.lang.Object
  |
  +--com.ibm.aglet.AgletID
All Implemented Interfaces:
java.io.Serializable

public class AgletID
extends java.lang.Object
implements java.io.Serializable

The AgletID class represents the unique identifier given the aglet.

Version:
1.10 $Date: 2001/07/28 06:33:49 $
Author:
Danny B. Lange, Mitsuru Oshima
See Also:
Serialized Form

Constructor Summary
AgletID(byte[] b)
          Constructs an aglet identifier with given byte array.
AgletID(java.lang.String rep)
          Constructs an aglet identifier with a given string.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares two aglet identifiers.
 int hashCode()
          Returns an integer suitable for hash table indexing.
 byte[] toByteArray()
          Returns byte array representation of the id.
 java.lang.String toString()
          Returns a human readable form of the aglet identifier.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgletID

public AgletID(byte[] b)
Constructs an aglet identifier with given byte array.

AgletID

public AgletID(java.lang.String rep)
Constructs an aglet identifier with a given string.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares two aglet identifiers.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the Aglet to be compared with.
Returns:
true if and only if the two Aglets are identical.

hashCode

public int hashCode()
Returns an integer suitable for hash table indexing.
Overrides:
hashCode in class java.lang.Object
Returns:
hash table indexing integer.

toByteArray

public byte[] toByteArray()
Returns byte array representation of the id. The copy of array is returned so that it cannot be altered.

toString

public java.lang.String toString()
Returns a human readable form of the aglet identifier.
Overrides:
toString in class java.lang.Object
Returns:
the Aglet identity in text form.