All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ants.TypeID

java.lang.Object
   |
   +----ants.TypeID

public final class TypeID
extends Object
Capsule, Method, CodeGroup and Protocol identifiers. This class wraps 128 bit MD5 hashes stored in byte arrays.


Constructor Index

 o TypeID(byte[], int)
Construct and initialize by deep copy

Method Index

 o compare(TypeID)
Compare two TypeIDs
 o equals(Object)
 o hashCode()
 o intern()
Intern a TypeID and return its cannonical value
 o sortVector(Vector)
Sort a vector of TypeIDs, ranking them with the compare method.
 o toString()
 o unwrap()
Unwrap, returning the inner byte array
 o wrap(byte[])
Construct and initialize by shallow copy.

Constructors

 o TypeID
 public TypeID(byte buf[],
               int offset)
Construct and initialize by deep copy

Methods

 o hashCode
 public int hashCode()
Overrides:
hashCode in class Object
 o equals
 public boolean equals(Object obj)
Overrides:
equals in class Object
 o intern
 public TypeID intern()
Intern a TypeID and return its cannonical value

 o compare
 public int compare(TypeID t)
Compare two TypeIDs

Returns:
s -1 (this < t), 0 (this.equals(t), 1 (this > t)
 o sortVector
 public static void sortVector(Vector ids)
Sort a vector of TypeIDs, ranking them with the compare method. Good for short vectors only -- implemented with insertion sort.

 o toString
 public String toString()
Overrides:
toString in class Object
 o wrap
 public static TypeID wrap(byte buf[])
Construct and initialize by shallow copy. The different notation is meant to emphasize that a complete object is not being created but rather an existing object is being packaged for convenience.

 o unwrap
 public byte[] unwrap()
Unwrap, returning the inner byte array


All Packages  Class Hierarchy  This Package  Previous  Next  Index