Class JsonNumberImpl

  • All Implemented Interfaces:
    java.io.Serializable, javax.json.JsonNumber, javax.json.JsonValue

    final class JsonNumberImpl
    extends java.lang.Object
    implements javax.json.JsonNumber, java.io.Serializable
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.json.JsonValue

        javax.json.JsonValue.ValueType
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Integer hashCode  
      private java.math.BigDecimal value  
      • Fields inherited from interface javax.json.JsonValue

        EMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonNumberImpl​(java.math.BigDecimal decimal)  
    • Field Detail

      • value

        private final java.math.BigDecimal value
      • hashCode

        private transient java.lang.Integer hashCode
    • Constructor Detail

      • JsonNumberImpl

        JsonNumberImpl​(java.math.BigDecimal decimal)
    • Method Detail

      • numberValue

        public java.lang.Number numberValue()
        Specified by:
        numberValue in interface javax.json.JsonNumber
      • isIntegral

        public boolean isIntegral()
        Specified by:
        isIntegral in interface javax.json.JsonNumber
      • intValue

        public int intValue()
        Specified by:
        intValue in interface javax.json.JsonNumber
      • intValueExact

        public int intValueExact()
        Specified by:
        intValueExact in interface javax.json.JsonNumber
      • longValue

        public long longValue()
        Specified by:
        longValue in interface javax.json.JsonNumber
      • longValueExact

        public long longValueExact()
        Specified by:
        longValueExact in interface javax.json.JsonNumber
      • bigIntegerValue

        public java.math.BigInteger bigIntegerValue()
        Specified by:
        bigIntegerValue in interface javax.json.JsonNumber
      • bigIntegerValueExact

        public java.math.BigInteger bigIntegerValueExact()
        Specified by:
        bigIntegerValueExact in interface javax.json.JsonNumber
      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in interface javax.json.JsonNumber
      • bigDecimalValue

        public java.math.BigDecimal bigDecimalValue()
        Specified by:
        bigDecimalValue in interface javax.json.JsonNumber
      • getValueType

        public javax.json.JsonValue.ValueType getValueType()
        Specified by:
        getValueType in interface javax.json.JsonValue
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface javax.json.JsonNumber
        Specified by:
        toString in interface javax.json.JsonValue
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface javax.json.JsonNumber
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface javax.json.JsonNumber
        Overrides:
        equals in class java.lang.Object
      • checkFractionalPart

        private void checkFractionalPart()