Package com.sdicons.json.model
Class JSONInteger
- java.lang.Object
-
- com.sdicons.json.model.JSONValue
-
- com.sdicons.json.model.JSONSimple
-
- com.sdicons.json.model.JSONNumber
-
- com.sdicons.json.model.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 Summary
Fields Modifier and Type Field Description private java.math.BigIntegervalue
-
Constructor Summary
Constructors Constructor Description JSONInteger(java.math.BigInteger value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.math.BigIntegergetValue()inthashCode()protected java.lang.Stringrender(boolean pretty, java.lang.String indent)Convert the JSON value into a string representation (JSON representation).java.lang.Objectstrip()Remove all JSON information, in the case of a JSONInteger this means a BigInteger.java.lang.StringtoString()
-
-
-
Method Detail
-
getValue
public java.math.BigInteger getValue()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
render
protected java.lang.String render(boolean pretty, java.lang.String indent)Description copied from class:JSONValueConvert the JSON value into a string representation (JSON representation).
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-