-
- All Implemented Interfaces:
-
io.kjson.JSONPrimitive,io.kjson.JSONValue,java.io.Serializable
public final class JSONDecimal extends JSONNumber implements JSONPrimitive<BigDecimal>
A JSON decimal value - that is, a JSON number that is not an integer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classJSONDecimal.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BigDecimalvalue
-
Constructor Summary
Constructors Constructor Description JSONDecimal(String str)JSONDecimal(Long long)JSONDecimal(Integer int)JSONDecimal(BigDecimal value)
-
Method Summary
Modifier and Type Method Description BigDecimalgetValue()StringtoJSON()UnitappendTo(Appendable a)BooleanisIntegral()BooleanisLong()BooleanisInt()BooleanisShort()BooleanisByte()BooleanisULong()BooleanisUInt()BooleanisUShort()BooleanisUByte()BooleanisZero()BooleanisNegative()BooleanisPositive()BooleanisNotZero()BooleanisNotNegative()BooleanisNotPositive()DoubletoDouble()FloattoFloat()LongtoLong()IntegertoInt()CharactertoChar()ShorttoShort()BytetoByte()BigDecimaltoDecimal()ULongtoULong()UInttoUInt()UShorttoUShort()UBytetoUByte()Booleanequals(Object other)IntegerhashCode()StringtoString()-
-
Method Detail
-
getValue
BigDecimal getValue()
-
toJSON
String toJSON()
-
isIntegral
Boolean isIntegral()
-
isLong
Boolean isLong()
-
isInt
Boolean isInt()
-
isShort
Boolean isShort()
-
isByte
Boolean isByte()
-
isULong
Boolean isULong()
-
isUInt
Boolean isUInt()
-
isUShort
Boolean isUShort()
-
isUByte
Boolean isUByte()
-
isZero
Boolean isZero()
-
isNegative
Boolean isNegative()
-
isPositive
Boolean isPositive()
-
isNotZero
Boolean isNotZero()
-
isNotNegative
Boolean isNotNegative()
-
isNotPositive
Boolean isNotPositive()
-
toDouble
Double toDouble()
-
toFloat
Float toFloat()
-
toLong
Long toLong()
-
toInt
Integer toInt()
-
toChar
Character toChar()
-
toShort
Short toShort()
-
toByte
Byte toByte()
-
toDecimal
BigDecimal toDecimal()
-
equals
Boolean equals(Object other)
-
hashCode
Integer hashCode()
-
toString
String toString()
-
-
-
-