public abstract class UniqueIdentifier
extends java.lang.Object
implements java.io.Externalizable
Although this class is designed to be sub-classed other classes should generally not rely upon these subclasses being subclasses of this class. This class is generally a private implementation artifact that just happens to be designed for re-use via subclassing rather than aggregation (mainly to keep the number of objects allocated down to just one).
| Modifier and Type | Field and Description |
|---|---|
static char |
SEPARATOR_CHAR
Character used to separate fields in string representation.
|
| Constructor and Description |
|---|
UniqueIdentifier()
Default constructor; no intialization is done here.
|
UniqueIdentifier(java.lang.String stringRep)
Construct instance from string representation as per parseBaseFields().
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(java.lang.StringBuilder builder)
Append string representation to the given
StringBuilder. |
boolean |
equals(java.lang.Object object)
Overridden to quickly examine all internal fields for logical equality.
|
long |
getIdNumber()
Return internal sequence id number.
|
int |
hashCode()
Overriden to efficiently generate hash codes from the most unique internal
field(s).
|
void |
readExternal(java.io.ObjectInput in)
Method implementation required by
Externalizable interface |
java.lang.String |
toString()
Produce string representation.
|
void |
writeExternal(java.io.ObjectOutput out)
Method implementation required by
Externalizable interface |
public static final char SEPARATOR_CHAR
public UniqueIdentifier()
public UniqueIdentifier(java.lang.String stringRep)
public java.lang.String toString()
toString in class java.lang.Objectpublic void appendTo(java.lang.StringBuilder builder)
StringBuilder.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
Externalizable interfacewriteExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
Externalizable interfacereadExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic long getIdNumber()