BsonBoolean

class BsonBoolean(value: Boolean) : BsonValue, Comparable<BsonBoolean>

A representation of the BSON Boolean type.

Constructors

Link copied to clipboard
fun BsonBoolean(value: Boolean)

constructs a new instance with the given value

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun asArray(): BsonArray

Gets this value as a BsonArray if it is one, otherwise throws exception

Link copied to clipboard
fun asBinary(): BsonBinary

Gets this value as a BsonBinary if it is one, otherwise throws exception

Link copied to clipboard
fun asBoolean(): BsonBoolean

Gets this value as a BsonBoolean if it is one, otherwise throws exception

Link copied to clipboard
fun asBsonMaxKey(): BsonMaxKey

Gets this value as a BsonMaxKey if it is one, otherwise throws exception

Link copied to clipboard
fun asBsonMinKey(): BsonMinKey

Gets this value as a BsonMinKey if it is one, otherwise throws exception

Link copied to clipboard
fun asBsonNull(): BsonNull

Gets this value as a BsonNull if it is one, otherwise throws exception

Link copied to clipboard
fun asBsonUndefined(): BsonUndefined

Gets this value as a BsonUndefined if it is one, otherwise throws exception

Link copied to clipboard
fun asDateTime(): BsonDateTime

Gets this value as a BsonDateTime if it is one, otherwise throws exception

Link copied to clipboard
fun asDBPointer(): BsonDBPointer

Gets this value as a BsonDBPointer if it is one, otherwise throws exception

Link copied to clipboard
fun asDecimal128(): BsonDecimal128

Gets this value as a BsonDecimal128 if it is one, otherwise throws exception

Link copied to clipboard
fun asDocument(): BsonDocument

Gets this value as a BsonDocument if it is one, otherwise throws exception

Link copied to clipboard
fun asDouble(): BsonDouble

Gets this value as a BsonDouble if it is one, otherwise throws exception

Link copied to clipboard
fun asInt32(): BsonInt32

Gets this value as a BsonInt32 if it is one, otherwise throws exception

Link copied to clipboard
fun asInt64(): BsonInt64

Gets this value as a BsonInt64 if it is one, otherwise throws exception

Link copied to clipboard
fun asJavaScript(): BsonJavaScript

Gets this value as a BsonJavaScript if it is one, otherwise throws exception

Link copied to clipboard
fun asJavaScriptWithScope(): BsonJavaScriptWithScope

Gets this value as a BsonJavaScriptWithScope if it is one, otherwise throws exception

Link copied to clipboard
fun asNumber(): BsonNumber

Gets this value as a BsonNumber if it is one, otherwise throws exception

Link copied to clipboard
fun asObjectId(): BsonObjectId

Gets this value as an BsonObjectId if it is one, otherwise throws exception

Link copied to clipboard
fun asRegularExpression(): BsonRegularExpression

Gets this value as a BsonRegularExpression if it is one, otherwise throws exception

Link copied to clipboard
fun asString(): BsonString

Gets this value as a BsonString if it is one, otherwise throws exception

Link copied to clipboard
fun asSymbol(): BsonSymbol

Gets this value as a BsonSymbol if it is one, otherwise throws exception

Link copied to clipboard
fun asTimestamp(): BsonTimestamp

Gets this value as a BsonTimestamp if it is one, otherwise throws exception

Link copied to clipboard
open operator override fun compareTo(other: BsonBoolean): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isArray(): Boolean
Link copied to clipboard
fun isBinary(): Boolean
Link copied to clipboard
fun isBoolean(): Boolean
Link copied to clipboard
fun isDateTime(): Boolean
Link copied to clipboard
fun isDBPointer(): Boolean
Link copied to clipboard
fun isDecimal128(): Boolean
Link copied to clipboard
fun isDocument(): Boolean
Link copied to clipboard
fun isDouble(): Boolean
Link copied to clipboard
fun isInt32(): Boolean
Link copied to clipboard
fun isInt64(): Boolean
Link copied to clipboard
fun isJavaScript(): Boolean
Link copied to clipboard
fun isJavaScriptWithScope(): Boolean
Link copied to clipboard
fun isMaxKey(): Boolean
Link copied to clipboard
fun isMinKey(): Boolean
Link copied to clipboard
fun isNull(): Boolean
Link copied to clipboard
fun isNumber(): Boolean
Link copied to clipboard
fun isObjectId(): Boolean
Link copied to clipboard
fun isRegularExpression(): Boolean
Link copied to clipboard
fun isString(): Boolean
Link copied to clipboard
fun isSymbol(): Boolean
Link copied to clipboard
fun isTimestamp(): Boolean
Link copied to clipboard
fun isUndefined(): Boolean
Link copied to clipboard
fun toJson(): String

Return an extended json representation of this BsonValue

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
open override val bsonType: BsonType

Gets the BSON type of this value.

Link copied to clipboard
val value: Boolean

the boolean value