A cursor is a handle to a specific element in a collection.

interface Cursor<T> {
    value: T;
    next(): undefined | Cursor<T>;
    nextAll(): IterableIterator<Cursor<T>, any, any>;
    prev(): undefined | Cursor<T>;
    prevAll(): IterableIterator<Cursor<T>, any, any>;
}

Type Parameters

  • T

Implemented by

Properties

Methods

Properties

value: T

A reference to the element pointed to by this cursor, as it was inserted into the collection.

Methods

  • Get a reference to the cursor that is immediately after this one.

    If the collection does not specify an order, this method will not exist.

    Returns undefined | Cursor<T>

  • Generate all elements from this cursor till the end of the collection.

    If the collection does not specify an order, this method will not exist.

    Returns IterableIterator<Cursor<T>, any, any>

  • Get a reference to the cursor that is immediately before to this one.

    If the collection does not specify an order, this method will not exist.

    Returns undefined | Cursor<T>

  • Generate all elements from this cursor till the beginning of the collection.

    If the collection does not specify an order, this method will not exist.

    Returns IterableIterator<Cursor<T>, any, any>