Package org.bson

Class BsonNumber

    • Constructor Detail

      • BsonNumber

        public BsonNumber​()
    • Method Detail

      • intValue

        public abstract int intValue​()
        Returns the value of the specified number as an int, which may involve rounding or truncation.
        Returns:
        the numeric value represented by this object after conversion to type int.
      • longValue

        public abstract long longValue​()
        Returns the value of the specified number as an long, which may involve rounding or truncation.
        Returns:
        the numeric value represented by this object after conversion to type long.
      • doubleValue

        public abstract double doubleValue​()
        Returns the value of the specified number as a double, which may involve rounding.
        Returns:
        the numeric value represented by this object after conversion to type double.
      • decimal128Value

        public abstract Decimal128 decimal128Value​()
        Returns the value of the specified number as a Decimal128, which may involve rounding.
        Returns:
        the numeric value represented by this object after conversion to type Decimal128.
        Since:
        3.4