public class IntIdentity extends SingleFieldIdentity
hashCode, keyAsObject, msg
Constructor and Description |
---|
IntIdentity()
Constructor only for Externalizable.
|
IntIdentity(Class pcClass,
int key)
Constructor with class and key.
|
IntIdentity(Class pcClass,
Integer key)
Constructor with class and key.
|
IntIdentity(Class pcClass,
String str)
Constructor with class and key.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
Determine the ordering of identity objects.
|
protected Object |
createKeyAsObject()
Create the key as an Object.
|
boolean |
equals(Object obj)
Determine if the other object represents the same object id.
|
int |
getKey()
Return the key.
|
void |
readExternal(ObjectInput in)
Read this object.
|
String |
toString()
Return the String form of the key.
|
void |
writeExternal(ObjectOutput out)
Write this object.
|
assertKeyNotNull, compare, getKeyAsObject, getTargetClass, getTargetClassName, hashClassName, hashCode, setKeyAsObject
public IntIdentity(Class pcClass, int key)
pcClass
- the classkey
- the keypublic IntIdentity(Class pcClass, Integer key)
pcClass
- the classkey
- the keypublic IntIdentity(Class pcClass, String str)
pcClass
- the classstr
- the keypublic IntIdentity()
public int getKey()
public String toString()
public boolean equals(Object obj)
equals
in class SingleFieldIdentity
obj
- the other objectpublic int compareTo(Object o)
o
- Other identityprotected Object createKeyAsObject()
createKeyAsObject
in class SingleFieldIdentity
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class SingleFieldIdentity
out
- the outputIOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class SingleFieldIdentity
in
- the inputIOException
ClassNotFoundException
Copyright © 2005–1970 Apache Software Foundation. All rights reserved.