public abstract class SingleFieldIdentity extends Object implements Externalizable, Comparable
Modifier and Type | Field and Description |
---|---|
protected int |
hashCode
The hashCode.
|
protected Object |
keyAsObject
The key as an Object.
|
protected static I18NHelper |
msg
The Internationalization message helper.
|
Modifier | Constructor and Description |
---|---|
|
SingleFieldIdentity()
Constructor only for Externalizable.
|
protected |
SingleFieldIdentity(Class pcClass)
Constructor with target class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
assertKeyNotNull(Object key)
Assert that the key is not null.
|
protected int |
compare(SingleFieldIdentity o)
Determine the ordering of identity objects.
|
protected Object |
createKeyAsObject()
Create the key as an Object.
|
boolean |
equals(Object obj)
Check the class and class name and object type.
|
Object |
getKeyAsObject()
Return the key as an Object.
|
Class |
getTargetClass()
Return the target class.
|
String |
getTargetClassName()
Return the target class name.
|
protected int |
hashClassName()
Return the hash code of the class name.
|
int |
hashCode()
Return the cached hash code.
|
void |
readExternal(ObjectInput in)
Read from the input stream.
|
protected void |
setKeyAsObject(Object key)
Set the given key as the key for this instance.
|
void |
writeExternal(ObjectOutput out)
Write to the output stream.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compareTo
protected static I18NHelper msg
protected int hashCode
protected Object keyAsObject
protected SingleFieldIdentity(Class pcClass)
pcClass
- the class of the targetpublic SingleFieldIdentity()
protected void setKeyAsObject(Object key)
protected void assertKeyNotNull(Object key)
public Class getTargetClass()
public String getTargetClassName()
public Object getKeyAsObject()
protected Object createKeyAsObject()
public boolean equals(Object obj)
protected int hashClassName()
public int hashCode()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- the streamIOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
protected int compare(SingleFieldIdentity o)
o
- Other identityCopyright © 2005–2020 Apache Software Foundation. All rights reserved.