Package org.bson

Class BsonNumber

Direct Known Subclasses:
BsonDecimal128, BsonDouble, BsonInt32, BsonInt64

@Deprecated(since="2022-10-31") public abstract class BsonNumber extends BsonValue
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
Base class for the three numeric BSON types. This class mirrors the functionality provided by java.lang.Number.
Since:
3.0
  • Constructor Details

    • BsonNumber

      public BsonNumber()
      Deprecated.
  • Method Details

    • intValue

      public abstract int intValue()
      Deprecated.
      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()
      Deprecated.
      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()
      Deprecated.
      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()
      Deprecated.
      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