Class NumberId

    • Constructor Detail

      • NumberId

        public NumberId​(BigDecimal id)
        Creates a NumberId.
        Parameters:
        id - The id to be used
    • Method Detail

      • write

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

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

        public boolean equals​(Object obj)
        Two NumberId 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 NumberId.
        Overrides:
        toString in class Object
        Returns:
        The value of the underlying id as string