com.ibm.aglet
Class AgletID

java.lang.Object
  extended bycom.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

Field Summary
private  byte[] id
          byte array containing id information used in the system.
(package private) static long serialVersionUID
           
 
Constructor Summary
private AgletID()
           
  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
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

id

private byte[] id
byte array containing id information used in the system.

Constructor Detail

AgletID

private AgletID()

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.

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.

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.

Returns:
the Aglet identity in text form.