public abstract class BsonNumber extends BsonValue
java.lang.Number
.Constructor and Description |
---|
BsonNumber() |
Modifier and Type | Method and Description |
---|---|
abstract Decimal128 |
decimal128Value()
Returns the value of the specified number as a
Decimal128 , which may involve rounding. |
abstract double |
doubleValue()
Returns the value of the specified number as a
double , which may involve rounding. |
abstract int |
intValue()
Returns the value of the specified number as an
int , which may involve rounding or truncation. |
abstract long |
longValue()
Returns the value of the specified number as an
long , which may involve rounding or truncation. |
asArray, asBinary, asBoolean, asDateTime, asDBPointer, asDecimal128, asDocument, asDouble, asInt32, asInt64, asJavaScript, asJavaScriptWithScope, asNumber, asObjectId, asRegularExpression, asString, asSymbol, asTimestamp, getBsonType, isArray, isBinary, isBoolean, isDateTime, isDBPointer, isDecimal128, isDocument, isDouble, isInt32, isInt64, isJavaScript, isJavaScriptWithScope, isNull, isNumber, isObjectId, isRegularExpression, isString, isSymbol, isTimestamp
public abstract int intValue()
int
, which may involve rounding or truncation.int
.public abstract long longValue()
long
, which may involve rounding or truncation.long
.public abstract double doubleValue()
double
, which may involve rounding.double
.public abstract Decimal128 decimal128Value()
Decimal128
, which may involve rounding.Decimal128
.