public class CharIdentity extends SingleFieldIdentity
Modifier and Type | Field and Description |
---|---|
private char |
key
The key.
|
private static I18NHelper |
msg
The Internationalization message helper.
|
hashCode, keyAsObject
Constructor and Description |
---|
CharIdentity()
Constructor only for Externalizable.
|
CharIdentity(java.lang.Class pcClass,
char key)
Constructor with class and key.
|
CharIdentity(java.lang.Class pcClass,
java.lang.Character key)
Constructor with class and key.
|
CharIdentity(java.lang.Class pcClass,
java.lang.String str)
Constructor with class and key.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Determine the ordering of identity objects.
|
private void |
computeHashCode() |
private void |
construct(char key) |
protected java.lang.Object |
createKeyAsObject()
Create the key as an Object.
|
boolean |
equals(java.lang.Object obj)
Determine if the other object represents the same object id.
|
char |
getKey()
Return the key.
|
void |
readExternal(java.io.ObjectInput in)
Read this object.
|
java.lang.String |
toString()
Return the String form of the key.
|
void |
writeExternal(java.io.ObjectOutput out)
Write this object.
|
assertKeyNotNull, compare, getKeyAsObject, getTargetClass, getTargetClassName, hashClassName, hashCode, setKeyAsObject
private static I18NHelper msg
private char key
public CharIdentity(java.lang.Class pcClass, char key)
pcClass
- the target classkey
- the keypublic CharIdentity(java.lang.Class pcClass, java.lang.Character key)
pcClass
- the target classkey
- the keypublic CharIdentity(java.lang.Class pcClass, java.lang.String str)
pcClass
- the target classstr
- the keypublic CharIdentity()
private void construct(char key)
public char getKey()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class SingleFieldIdentity
obj
- the other objectpublic int compareTo(java.lang.Object o)
o
- Other identityprotected java.lang.Object createKeyAsObject()
createKeyAsObject
in class SingleFieldIdentity
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class SingleFieldIdentity
out
- the outputjava.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class SingleFieldIdentity
in
- the inputjava.io.IOException
java.lang.ClassNotFoundException
private void computeHashCode()