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

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

Properties

Link copied to clipboard
val booleanValue: Boolean

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

Link copied to clipboard
val double: Double?

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

Link copied to clipboard
val doubleValue: Double

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
val floatValue: Float

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
val intValue: Int

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
val listValue: List<Any?>

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
val mapValue: Map<String, Any?>

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

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

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

Link copied to clipboard
val stringValue: String

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.