ants
Class TypeID
java.lang.Object
|
+--ants.TypeID
- public final class TypeID
- extends java.lang.Object
Capsule, Method, CodeGroup and Protocol identifiers.
This class wraps 128 bit MD5 hashes stored in byte arrays.
Constructor Summary |
TypeID(byte[] buf)
Construct and initialize by deep copy |
TypeID(byte[] buf,
int offset)
|
Method Summary |
int |
compare(TypeID t)
Compare two TypeIDs |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
TypeID |
intern()
Intern a TypeID and return its cannonical value |
static void |
sortVector(java.util.Vector ids)
Sort a vector of TypeIDs, ranking them with the compare method. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
TypeID
public TypeID(byte[] buf)
- Construct and initialize by deep copy
TypeID
public TypeID(byte[] buf,
int offset)
hashCode
public int hashCode()
- Overrides:
- hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
- equals in class java.lang.Object
intern
public TypeID intern()
- Intern a TypeID and return its cannonical value
compare
public int compare(TypeID t)
- Compare two TypeIDs
sortVector
public static void sortVector(java.util.Vector ids)
- Sort a vector of TypeIDs, ranking them with the compare method.
Good for short vectors only -- implemented with insertion sort.
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object