Class JSONInteger


  • public class JSONInteger
    extends JSONNumber
    Represents a JSON int. JSON only defines "numbers" but during parsing a difference is made between integral types and floating types.
    • Field Detail

      • value

        private java.math.BigInteger value
    • Constructor Detail

      • JSONInteger

        public JSONInteger​(java.math.BigInteger value)
    • Method Detail

      • getValue

        public java.math.BigInteger getValue()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • render

        protected java.lang.String render​(boolean pretty,
                                          java.lang.String indent)
        Description copied from class: JSONValue
        Convert the JSON value into a string representation (JSON representation).
        Specified by:
        render in class JSONValue
        Parameters:
        pretty - Indicating if the print should be made pretty (human readers) or compact (transmission or storage).
        indent - Starting indent.
        Returns:
        A JSON representation.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • strip

        public java.lang.Object strip()
        Remove all JSON information, in the case of a JSONInteger this means a BigInteger.
        Specified by:
        strip in class JSONValue
        Returns:
        A BigInteger representing the value of the JSONInteger object.