Package org.apache.johnzon.core
Class JsonNumberImpl
- java.lang.Object
- 
- org.apache.johnzon.core.JsonNumberImpl
 
- 
- All Implemented Interfaces:
- jakarta.json.JsonNumber,- jakarta.json.JsonValue,- Serializable
 
 final class JsonNumberImpl extends Object implements jakarta.json.JsonNumber, Serializable 
- 
- 
Field SummaryFields Modifier and Type Field Description private IntegerhashCodeprivate Consumer<BigDecimal>maxBigDecimalScaleprivate BigDecimalvalue
 - 
Constructor SummaryConstructors Constructor Description JsonNumberImpl(BigDecimal decimal, Consumer<BigDecimal> maxBigDecimalScale)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimalbigDecimalValue()BigIntegerbigIntegerValue()BigIntegerbigIntegerValueExact()private voidcheckFractionalPart()doubledoubleValue()booleanequals(Object obj)jakarta.json.JsonValue.ValueTypegetValueType()inthashCode()intintValue()intintValueExact()booleanisIntegral()longlongValue()longlongValueExact()NumbernumberValue()StringtoString()
 
- 
- 
- 
Field Detail- 
valueprivate final BigDecimal value 
 - 
hashCodeprivate transient Integer hashCode 
 - 
maxBigDecimalScaleprivate transient Consumer<BigDecimal> maxBigDecimalScale 
 
- 
 - 
Constructor Detail- 
JsonNumberImplJsonNumberImpl(BigDecimal decimal, Consumer<BigDecimal> maxBigDecimalScale) 
 
- 
 - 
Method Detail- 
numberValuepublic Number numberValue() - Specified by:
- numberValuein interface- jakarta.json.JsonNumber
 
 - 
isIntegralpublic boolean isIntegral() - Specified by:
- isIntegralin interface- jakarta.json.JsonNumber
 
 - 
intValuepublic int intValue() - Specified by:
- intValuein interface- jakarta.json.JsonNumber
 
 - 
intValueExactpublic int intValueExact() - Specified by:
- intValueExactin interface- jakarta.json.JsonNumber
 
 - 
longValuepublic long longValue() - Specified by:
- longValuein interface- jakarta.json.JsonNumber
 
 - 
longValueExactpublic long longValueExact() - Specified by:
- longValueExactin interface- jakarta.json.JsonNumber
 
 - 
bigIntegerValuepublic BigInteger bigIntegerValue() - Specified by:
- bigIntegerValuein interface- jakarta.json.JsonNumber
 
 - 
bigIntegerValueExactpublic BigInteger bigIntegerValueExact() - Specified by:
- bigIntegerValueExactin interface- jakarta.json.JsonNumber
 
 - 
doubleValuepublic double doubleValue() - Specified by:
- doubleValuein interface- jakarta.json.JsonNumber
 
 - 
bigDecimalValuepublic BigDecimal bigDecimalValue() - Specified by:
- bigDecimalValuein interface- jakarta.json.JsonNumber
 
 - 
getValueTypepublic jakarta.json.JsonValue.ValueType getValueType() - Specified by:
- getValueTypein interface- jakarta.json.JsonValue
 
 - 
toStringpublic String toString() 
 - 
hashCodepublic int hashCode() 
 - 
equalspublic boolean equals(Object obj) 
 - 
checkFractionalPartprivate void checkFractionalPart() 
 
- 
 
-