|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tc.util.AbstractIdentifier
public abstract class AbstractIdentifier
Generic Identifier class, parent class of many ID types. Legal identifiers are expected to be >= 0 and -1 represents a "null" identifier.
Constructor Summary | |
---|---|
protected |
AbstractIdentifier()
Create a null identifier |
|
AbstractIdentifier(long id)
Create an identifier with a long value, which is expected to be >= 0. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object obj)
Equality is based on the id value and the identifier class. |
abstract java.lang.String |
getIdentifierType()
Subclasses of AbstractIdentifier specify their "type" by implementing this method and returning a string. |
int |
hashCode()
|
boolean |
isNull()
Check whether the identifier is null (-1). |
long |
toLong()
Convert to long |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractIdentifier(long id)
protected AbstractIdentifier()
Method Detail |
---|
public boolean isNull()
public final long toLong()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String getIdentifierType()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |