DittoMutableRGA

class DittoMutableRGA : DittoRGA

Represents a mutable CRDT Replicated Growable Array (DittoRGA) that can be updated as part of updating a document.

This class can't be instantiated directly. It's returned automatically for any DittoRGA property within an update block.

See also the rga property of DittoMutableDocumentPath.

Functions

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

Encodes the DittoRGA into a Map, ready to be encoded as CBOR.

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

Get the element at the given index. Enables indexed access to the DittoRGA values.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun insert(index: Int, value: Any?)

Inserts a value into the DittoRGA at the index specified.

Link copied to clipboard
fun pop(): Any?

Pop a value off the end of the DittoRGA.

Link copied to clipboard
fun push(value: Any?)

Push a value on to the end of the DittoRGA.

Link copied to clipboard
fun remove(index: Int)

Removes a value at the specified index.

Link copied to clipboard
operator fun set(index: Int, value: Any?)

Set the element at the given index. Enables indexed modifications to the DittoRGA values.

Properties

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

Array representation of the DittoRGA.