Package com.sdicons.json.model
Class JSONDecimal
- java.lang.Object
-
- com.sdicons.json.model.JSONValue
-
- com.sdicons.json.model.JSONSimple
-
- com.sdicons.json.model.JSONNumber
-
- com.sdicons.json.model.JSONDecimal
-
public class JSONDecimal extends JSONNumber
Represents a JSON float. 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.BigDecimal
value
-
Constructor Summary
Constructors Constructor Description JSONDecimal(java.math.BigDecimal value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.math.BigDecimal
getValue()
int
hashCode()
protected java.lang.String
render(boolean pretty, java.lang.String indent)
Convert the JSON value into a string representation (JSON representation).java.lang.Object
strip()
Remove all JSON information.java.lang.String
toString()
-
-
-
Method Detail
-
getValue
public java.math.BigDecimal getValue()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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).
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-