public interface OracleJsonNumber extends OracleJsonValue
OracleJsonValue.OracleJsonType
FALSE, NULL, TRUE
Modifier and Type | Method and Description |
---|---|
BigDecimal |
bigDecimalValue()
Returns this number as a
BigDecimal value. |
BigInteger |
bigIntegerValue()
Returns this number as a
BigInteger . |
BigInteger |
bigIntegerValueExact()
Returns this number as a
BigInteger . |
double |
doubleValue()
Returns this value as a
double . |
float |
floatValue()
Returns this value as a
float . |
int |
intValue()
Returns this number as an int.
|
int |
intValueExact()
Returns this number as an int.
|
boolean |
isIntegral()
Returns true when
bigDecimalValue().scale() == 0 . |
long |
longValue()
Returns this number as a long.
|
long |
longValueExact()
Returns this number as an long.
|
asJsonArray, asJsonBinary, asJsonDate, asJsonDecimal, asJsonDouble, asJsonFloat, asJsonIntervalDS, asJsonIntervalYM, asJsonNumber, asJsonObject, asJsonString, asJsonTimestamp, asJsonTimestampTZ, getOracleJsonType, toString, wrap
boolean isIntegral()
bigDecimalValue().scale() == 0
.int intValue()
int intValueExact()
ArithmeticException
- if the number has a non-fractional part or if
it does not fit in an intlong longValue()
long longValueExact()
ArithmeticException
- if the number has a non-fractional part or if
it does not fit in an longBigDecimal bigDecimalValue()
BigDecimal
value.BigDecimal
BigInteger bigIntegerValue()
BigInteger
. This number may lose information about the
overall magnitude and precision of the number value.BigInteger
BigInteger bigIntegerValueExact()
BigInteger
.BigInteger
ArithmeticException
- if the number has a non-fractional part or if
it does not fit in an longdouble doubleValue()
double
. For values of type OracleJsonType#DECIMAL
this method may lose information about the overall magnitude and precision of the number value.double
.float floatValue()
float
. For values of type OracleJsonType#DECIMAL
or OracleJsonType#DOUBLE
this method may lose information about the overall magnitude and precision of the number value.float
.