DittoMutableRegister

class DittoMutableRegister : DittoRegister

Represents a mutable CRDT register that can be updated while updating a document. This class can't be instantiated directly, it's returned automatically for any register property within an update block. See also the register properties of DittoDocumentPath and DittoMutableDocumentPath.

Functions

cbor
Link copied to clipboard
fun cbor(): Map<String, Any?>

Builds a Map representation of the DittoRegister ready to be translated to CBOR.

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int

Properties

booleanValue
Link copied to clipboard
val booleanValue: Boolean

Returns the register's value as a Boolean if possible, otherwise returns null.

double
Link copied to clipboard
val double: Double?

Returns the register's value as a Double if possible, otherwise returns null.

doubleValue
Link copied to clipboard
val doubleValue: Double

Returns the register's value as a Double if possible, otherwise returns 0.0.

float
Link copied to clipboard
val float: Float?

Returns the register's value as a Float if possible, otherwise returns null.

floatValue
Link copied to clipboard
val floatValue: Float

Returns the register's value as a Float if possible, otherwise returns 0.0f.

int
Link copied to clipboard
val int: Int?

Returns the register's value as a Int if possible, otherwise returns null.

intValue
Link copied to clipboard
val intValue: Int

Returns the register's value as a Int if possible, otherwise returns 0.

list
Link copied to clipboard
val list: List<Any?>?

Returns the register's value as a List<Any?> if possible, otherwise returns null.

listValue
Link copied to clipboard
val listValue: List<Any?>

Returns the register's value as a List<Any?> if possible, otherwise an empty List.

map
Link copied to clipboard
val map: Map<String, Any?>?

Returns the register's value as a Map<String, Any?> if possible, otherwise returns null.

mapValue
Link copied to clipboard
val mapValue: Map<String, Any?>

Returns the register's value Map<String, Any?> if possible, otherwise an empty Map.

mutableDocumentPath
Link copied to clipboard
val mutableDocumentPath: DittoMutableDocumentPath
string
Link copied to clipboard
val string: String?

Returns the register's value as a String if possible, otherwise returns null.

stringValue
Link copied to clipboard
val stringValue: String

Returns the register's value as a String if possible, otherwise returns an empty String.

value
Link copied to clipboard
open override var value: Any?

Current value of the DittoRegister.