A concrete implementation of [[IObservableList]].

Type Parameters

  • T

Hierarchy (view full)

Implements

Constructors

Properties

_array: T[] = []
_isDisposed: boolean = false
_itemCmp: ((first, second) => boolean)

Type declaration

    • (first, second): boolean
    • Parameters

      • first: T
      • second: T

      Returns boolean

Accessors

Methods

  • Insert a value into the list at a specific index.

    Parameters

    • index: number

      The index at which to insert the value.

    • value: T

      The value to set at the specified index.

      Complexity

      Linear.

      Iterator Validity

      No changes.

      Notes

      The index will be clamped to the bounds of the list.

      By convention, the oldIndex is set to -2 to indicate an insert operation.

      The value -2 as oldIndex can be used to distinguish from the push method which will use a value -1.

      Undefined Behavior

      An index which is non-integral.

    Returns void