final class BSONArray extends BSONValue
A BSONArray structure (BSON type 0x04).
A BSONArray is a indexed sequence of BSONValue.
- Alphabetic
- By Inheritance
- BSONArray
- BSONValue
- AnyRef
- Any
- by identityValueProducer
- by valueProducer
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ++(values: BSONValue*): BSONArray
Returns a BSON array with the given values appended.
- def ++(arr: BSONArray): BSONArray
Returns a BSON array with the values of the given one appended.
- def +:(value: BSONValue): BSONArray
Returns a BSON array with the given value prepended.
- def ->[B](y: B): (BSONArray, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def asOpt[T](implicit reader: BSONReader[T]): Option[T]
Optionally parses this value as a
Tone.Optionally parses this value as a
Tone.- returns
Somesuccessfully parsed value, orNoneif failsimport scala.util.Try import reactivemongo.api.bson.BSONValue def foo(v: BSONValue): Option[String] = v.asOpt[String]
- Definition Classes
- BSONValue
- final def asTry[T](implicit reader: BSONReader[T]): Try[T]
Tries to parse this value as a
Tone.Tries to parse this value as a
Tone.import scala.util.Try import reactivemongo.api.bson.BSONValue def foo(v: BSONValue): Try[String] = v.asTry[String]
- Definition Classes
- BSONValue
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val code: Byte
The code indicating the BSON type for this value
- def ensuring(cond: (BSONArray) => Boolean, msg: => Any): BSONArray
- def ensuring(cond: (BSONArray) => Boolean): BSONArray
- def ensuring(cond: Boolean, msg: => Any): BSONArray
- def ensuring(cond: Boolean): BSONArray
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
- Definition Classes
- BSONArray → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def formatted(fmtstr: String): String
- def get(index: Int): Option[BSONValue]
Returns the BSONValue at the given
index.Returns the BSONValue at the given
index.If there is no such
index, or if the matching value cannot be deserialized returnsNone.- index
the index to be found in the array
- def getAsOpt[T](index: Int)(implicit reader: BSONReader[T]): Option[T]
Returns the BSONValue at the given
index, and converts it with the given implicit BSONReader.Returns the BSONValue at the given
index, and converts it with the given implicit BSONReader.If there is no matching value, or the value could not be deserialized, or converted, returns a
None.- index
the index to be found in the array
- def getAsTry[T](index: Int)(implicit reader: BSONReader[T]): Try[T]
Gets the BSONValue at the given
index, and converts it with the given implicit BSONReader.Gets the BSONValue at the given
index, and converts it with the given implicit BSONReader.If there is no matching value, or the value could not be deserialized, or converted, returns a
Failure.The
Failureholds a exceptions.BSONValueNotFoundException if the index could not be found.- index
the index to be found in the array
- def getAsUnflattendTry[T](index: Int)(implicit reader: BSONReader[T]): Try[Option[T]]
Gets the BSONValue at the given
index, and converts it with the given implicit BSONReader.Gets the BSONValue at the given
index, and converts it with the given implicit BSONReader.If there is no matching value,
Success(None)is returned. If there is a value, it must be valid or aFailureis returned.- index
the index to be found in the array
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- BSONArray → AnyRef → Any
- def headOption: Option[BSONValue]
The first/mandatory value, if any
- def isEmpty: Boolean
Indicates whether this array is empty
Indicates whether this array is empty
- Annotations
- @inline()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def size: Int
The number of values
The number of values
- Annotations
- @inline()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- BSONArray → AnyRef → Any
- val values: IndexedSeq[BSONValue]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def →[B](y: B): (BSONArray, B)
- Implicit
- This member is added by an implicit conversion from BSONArray toArrowAssoc[BSONArray] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.