|
ANTS v2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ants.core.TypeID
Capsule, CapsuleClass, CodeGroup and Protocol identifiers. This class wraps 128 bit MD5 hashes stored in byte arrays.
See the text file On_IDs.txt for a description of how these IDs are used.
Constructor Summary | |
TypeID(byte[] buf,
int offset)
Construct a new TypeID and initialize by deep copy. |
Method Summary | |
int |
compare(TypeID t)
Compare two TypeIDs |
static TypeID |
computeFromIDs(TypeID[] ids)
Compute an ID from a vector of codeIDs. |
boolean |
equals(java.lang.Object obj)
Compare this TypeID with the given one. |
int |
hashCode()
|
TypeID |
intern()
Intern a TypeID and return its canonical value. |
static void |
sortArray(TypeID[] ids)
Sort an array of TypeIDs. |
java.lang.String |
toString()
|
byte[] |
unwrap()
Unwrap this TypeID, returning the inner byte array. |
static TypeID |
wrap(byte[] buf)
Construct and initialize by shallow copy. |
Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public TypeID(byte[] buf, int offset)
buf
- the byte[] to copy into this new TypeID.offset
- offset in buf to copy fromMethod Detail |
public int hashCode()
public boolean equals(java.lang.Object obj)
public TypeID intern()
public int compare(TypeID t)
public static void sortArray(TypeID[] ids)
public static TypeID computeFromIDs(TypeID[] ids)
This is done by computing a multiple-element md5 hash over a sorted list of code ids.
XXX Combine the insertion sort and the id.update() step from this function. Should only have to iterate over the list once.
public java.lang.String toString()
public byte[] unwrap()
public static TypeID wrap(byte[] buf)
The length of the buf is not checked.
buf
- 16-byte byte[] containing an MD5 checksum.
|
ANTS v2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |