Class StringId

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

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

      • key

        private java.lang.String key
    • Constructor Detail

      • StringId

        public StringId​(java.lang.Class<?> pcClass,
                        java.lang.String key)
      • StringId

        public StringId()
    • Method Detail

      • getKey

        public java.lang.String getKey()
      • 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​(StringId 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.String,​StringId>
        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.String,​StringId>
        Parameters:
        in - the input
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException