-
- All Implemented Interfaces:
-
io.kjson.JSONPrimitive,io.kjson.JSONValue,java.io.Serializable
public final class JSONInt extends JSONNumber implements JSONPrimitive<Int>
A JSON integer value (up to 32 bits).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classJSONInt.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Integervalue
-
Constructor Summary
Constructors Constructor Description JSONInt(Integer value)
-
Method Summary
Modifier and Type Method Description IntegergetValue()UnitappendTo(Appendable a)Unitoutput(IntConsumer out)UnitcoOutput(SuspendFunction1<Character, Unit> out)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
Integer getValue()
-
coOutput
Unit coOutput(SuspendFunction1<Character, Unit> out)
-
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()
-
-
-
-