DittoMutableRegister

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.

Properties

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
val float: Float?

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

Link copied to clipboard

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

Link copied to clipboard
val int: Int?

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

Link copied to clipboard

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

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

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

Link copied to clipboard

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

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

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
open override var value: Any?

Current value of the DittoRegister.

Functions

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

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

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