Class StringId

    • Constructor Detail

      • StringId

        public StringId​(String id)
        Creates an StringId.
        Parameters:
        id - The id to be used
    • Method Detail

      • get

        public String get()
        Getter for the actual id.
        Specified by:
        get in interface Supplier<String>
        Returns:
        The actual id
      • write

        public void write​(com.google.gson.stream.JsonWriter out)
                   throws IOException
        Writes a String to out.
        Specified by:
        write in interface Id<String>
        Parameters:
        out - The JsonWriter used as output
        Throws:
        IOException - If serialization fails
      • hashCode

        public int hashCode()
        Returns the hash code for this StringId.
        Overrides:
        hashCode in class Object
        Returns:
        The hash code of the underlying id
      • equals

        public boolean equals​(Object obj)
        Two StringId objects are equal if their underlying id is equal.
        Overrides:
        equals in class Object
        Parameters:
        obj - The object to be checked
        Returns:
        true if the object is equal as described above
      • toString

        public String toString()
        Returns the string representation for this StringId.
        Overrides:
        toString in class Object
        Returns:
        The underlying id