DITMutableRGA

@interface DITMutableRGA : DITRGA

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

This class can’t be instantiated directly, it’s returned automatically for any RGA property within an update block.

See also the rga properties of DITDocumentPath and DITMutableDocumentPath.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Set a value at the specified index.

    Declaration

    Objective-C

    - (void)set:(nonnull id)value atIndex:(NSUInteger)index;

    Parameters

    value

    The value to set at the specified index.

    index

    The index at which to set the provided value.

  • Remove a value at the specified index.

    Declaration

    Objective-C

    - (void)removeAtIndex:(NSUInteger)index;

    Parameters

    index

    The index of the element to remove.

  • Push a value on to the end of the RGA.

    Declaration

    Objective-C

    - (void)push:(nonnull id)value;

    Parameters

    value

    The value to push on to the RGA.

  • Pop a value off the end of the RGA.

    Declaration

    Objective-C

    - (nullable id)pop;

    Return Value

    The value popped off from the end of the RGA.

  • Inserts a value into an the RGA at the index specified.

    Declaration

    Objective-C

    - (void)insert:(nonnull id)value atIndex:(NSUInteger)index;

    Parameters

    value

    The value to insert into the RGA.

    index

    The index at which to insert the provided value.