BSONDecimal

final class BSONDecimal extends BSONValue

Value wrapper for a BSON 128-bit decimal.

Value parameters:
high

the high-order 64 bits

low

the low-order 64 bits

Companion:
object
trait BSONValue
class Object
trait Matchable
class Any

Value members

Concrete methods

override def equals(that: Any): Boolean
Definition Classes
Any
override def toString: String

Returns the string representation.

Returns the string representation.

Definition Classes
Any

Inherited methods

final def asOpt[T](implicit reader: BSONReader[T]): Option[T]

Optionally parses this value as a T one.

Optionally parses this value as a T one.

Returns:

Some successfully parsed value, or None if fails

import reactivemongo.api.bson.BSONValue
def foo(v: BSONValue): Option[String] = v.asOpt[String]
Inherited from:
BSONValue
final def asTry[T](implicit reader: BSONReader[T]): Try[T]

Tries to parse this value as a T one.

Tries to parse this value as a T one.

import scala.util.Try
import reactivemongo.api.bson.BSONValue

def foo(v: BSONValue): Try[String] = v.asTry[String]
Inherited from:
BSONValue

Concrete fields

lazy override val asInt: Try[Int]
val code: Int
lazy override val hashCode: Int
val high: Long

Returns true if is infinite.

Returns true if is infinite.

lazy val isNaN: Boolean

Returns true if is Not-A-Number (NaN).

Returns true if is Not-A-Number (NaN).

Returns true if is negative.

Returns true if is negative.

val low: Long
lazy override val toDouble: Try[Double]
lazy override val toFloat: Try[Float]