Provides access to items in a HistoryList. The iteration can start anywhere in the HistoryList. The iteration ends with the newest value that was added to the HistoryList.

interface HistoryIterator<T> {
    getIndex(): number;
    getValue(): T;
    hasNext(): boolean;
    hasPrevious(): boolean;
    nextValue(): T;
    previousValue(): T;
}

Type Parameters

  • T

Implemented by

Methods

  • Returns the index of the current value. In a HistoryList the index starts at zero and increases as each value is added to the HistoryList.

    Returns number

    the index of the current value

    Throws

    when the index number exceeds the maximum representable integer

  • Returns the current value that this iterator points to in the HistoryList.

    Returns T

    the current value in the HistoryList

    Throws

    if there is no current value

  • Returns true if there is a next value in this iteration of the HistoryList.

    Returns boolean

    true if there is a next value in this iteration

  • Returns true if there is a previous value in this iteration of the HistoryList.

    Returns boolean

    true if there is a previous value in this iteration

  • Moves to the next value in the HistoryList.

    Returns T

    the next value in the HistoryList

    Throws

    if there is no next value

  • Moves to the previous value in the HistoryList.

    Returns T

    the previous value in the HistoryList

    Throws

    if there is no previous value

Generated using TypeDoc