Class CharId

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, java.lang.Comparable<CharId>

    public class CharId
    extends SingleFieldId<java.lang.Character,​CharId>
    This class is for identity with a single character field.
    See Also:
    Serialized Form
    • Field Detail

      • key

        private char key
    • Constructor Detail

      • CharId

        public CharId​(java.lang.Class<?> pcClass,
                      char key)
      • CharId

        public CharId​(java.lang.Class<?> pcClass,
                      java.lang.Character key)
      • CharId

        public CharId​(java.lang.Class<?> pcClass,
                      java.lang.String str)
      • CharId

        public CharId()
    • Method Detail

      • getKey

        public char getKey()
      • getKeyAsObject

        public java.lang.Character getKeyAsObject()
        Description copied from class: SingleFieldId
        Accessor for the key
        Specified by:
        getKeyAsObject in class SingleFieldId<java.lang.Character,​CharId>
        Returns:
        The key
      • toString

        public java.lang.String toString()
        Return the String form of the key.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String form of the key
      • compareTo

        public int compareTo​(CharId other)
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this object. Write the superclass first.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class SingleFieldId<java.lang.Character,​CharId>
        Parameters:
        out - the output
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Read this object. Read the superclass first.
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class SingleFieldId<java.lang.Character,​CharId>
        Parameters:
        in - the input
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException