Interface IList<E>

Concurrent and distributed list.

Methods that require serialization/deserialization may throw RangeError, e.g when there is no suitable serializer for a certain type.

Type Parameters

  • E

Hierarchy

Methods

  • Appends the specified element to the end of the list.

    Returns

    true if this list has changed as a result of this operation, false otherwise.

    Parameters

    • element: E

      element to be added

    Returns Promise<boolean>

  • Appends all elements in the specified array to the end of this list, keeping the order of the array.

    Returns

    true if this list has changed as a result of this operation, false otherwise.

    Parameters

    • elements: E[]

      array to be appended

    Returns Promise<boolean>

  • Inserts all elements in the specified array at specified index, keeping the order of the array. Shifts the subsequent elements to the right.

    Returns

    true if this list has changed as a result of this operation, false otherwise.

    Parameters

    • index: number

      position at which the array's elements should be inserted

    • elements: E[]

      array to be inserted

    Returns Promise<boolean>

  • Inserts the specified element at the specified index. Shifts the subsequent elements to the right.

    Parameters

    • index: number

      position at which the element should be inserted

    • element: E

      element to be inserted

    Returns Promise<void>

  • Adds an item listener for this list. Listener will be invoked whenever an item is added to or removed from this list.

    Returns

    registration ID of the listener.

    Parameters

    • listener: ItemListener<E>

      object with listener functions

    • includeValue: boolean

      true if updated item should be included in the event.

    Returns Promise<string>

  • Removes all of the elements from this list.

    Returns Promise<void>

  • Checks if the list contains the given element.

    Returns

    true if this list contains the specified element, false otherwise.

    Parameters

    • element: E

    Returns Promise<boolean>

  • Checks if the list contains all of the elements of the specified array.

    Returns

    true if this list contains all of the elements of the specified array, false otherwise.

    Parameters

    • elements: E[]

      elements to be checked for presence in this list.

    Returns Promise<boolean>

  • Returns the element at the specified position in this list.

    Parameters

    • index: number

      index of the element to return.

    Returns Promise<E>

  • Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

    Parameters

    • element: E

      element to search for

    Returns Promise<number>

  • Checks if this list is empty.

    Returns

    true if this list contains no elements, false otherwise.

    Returns Promise<boolean>

  • Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.

    Parameters

    • element: E

    Returns Promise<number>

  • Removes the first occurrence of the specified element from this list, if it is present.

    Returns

    true if this list has changed as a result of this operation, false otherwise.

    Parameters

    • element: E

      element to be removed

    Returns Promise<boolean>

  • Removes from this list all of its elements that are contained in the specified array.

    Returns

    true if this list has changed as a result of this operation, false otherwise.

    Parameters

    • elements: E[]

      elements to be removed

    Returns Promise<boolean>

  • Removes the element at the specified position in this list.

    Returns

    the removed element.

    Parameters

    • index: number

      index of the element to be removed.

    Returns Promise<E>

  • Removes an ItemListener from this list.

    Returns

    true if the item listener was successfully removed, false otherwise.

    Parameters

    • listenerId: string

      registration ID of the listener to be removed.

    Returns Promise<boolean>

  • Retains only the elements in this list that are contained in the specified array.

    Returns

    true if this list has changed as a result of this operation, false otherwise.

    Parameters

    • elements: E[]

      elements to retain

    Returns Promise<boolean>

  • Replaces the element at the specified position in this list with the specified element.

    Returns

    previous element at the given index.

    Parameters

    • index: number

      position of the element to be replaced

    • element: E

      replacement element

    Returns Promise<E>

  • Returns the number of elements in this list.

    Returns Promise<number>

  • Returns a view of this list that contains elements between index numbers from start (inclusive) to end (exclusive)

    Returns

    a view of the list

    Parameters

    • start: number

      start of the view

    • end: number

      end of the view

    Returns Promise<ReadOnlyLazyList<E>>

  • Returns an array that contains all elements of this list in proper sequence (from first to last element).

    Returns Promise<E[]>

Generated using TypeDoc