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

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

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

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

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

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

Inserts a value into an the DittoRGA at the index specified.

pop
Link copied to clipboard
fun pop(): Any?

Pop a value off the end of the DittoRGA.

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

Push a value on to the end of the DittoRGA.

remove
Link copied to clipboard
fun remove(index: Int)

Removes a value at the specified index.

set
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

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

Array representation of the DittoRGA.