|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.objects.UniqueID
public class UniqueID
A class that represents an immutable universally unique identifier (UUID).
It represents a 128-bit value.
It is generated using UUID
class's static constructor.
Note: we decided not to use the UUID class directly, because it is memory intensive.
UUID
,
Serialized FormConstructor Summary | |
---|---|
protected |
UniqueID()
Creates a new instance of UniqueID with newly generated ID. |
protected |
UniqueID(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of UniqueID loaded from binary input. |
protected |
UniqueID(UniqueID source)
Creates a new instance of UniqueID from an existing UniqueID object. |
Method Summary | |
---|---|
protected int |
binarySerialize(BinaryOutput output,
BinarySerializator serializator)
Binary-serialize this object into the output . |
protected java.lang.Object |
clone()
Creates and returns a copy of this object. |
int |
compareTo(UniqueID val)
Compares this unique ID with the specified unique ID. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
protected int |
getBinarySize(BinarySerializator serializator)
Returns the exact size of the binary-serialized version of this object in bytes. |
int |
hashCode()
Returns a hash code value for this unique ID. |
java.lang.String |
toString()
Returns a string representation of this unique ID. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected UniqueID()
protected UniqueID(UniqueID source)
source
- the unique ID to copy fromprotected UniqueID(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
input
- the input to read the ID fromserializator
- the serializator used to write objects
java.io.IOException
- if there was an I/O error reading from the inputMethod Detail |
---|
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with.
public final int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
Cloneable
interface.
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public final int compareTo(UniqueID val)
The first of two unique IDs follows the second if the most significant field in which the unique IDs differ is greater for the first unique ID.
compareTo
in interface java.lang.Comparable<UniqueID>
val
- the unique ID to which this unique ID is to be compared.
protected int binarySerialize(BinaryOutput output, BinarySerializator serializator) throws java.io.IOException
output
.
output
- the output that this object is binary-serialized intoserializator
- the serializator used to write objects
java.io.IOException
- if there was an I/O error during serializationprotected int getBinarySize(BinarySerializator serializator)
serializator
- the serializator used to write objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |