Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IList<E>

Type parameters

  • E

Hierarchy

Implemented by

Index

Methods

add

  • add(element: E): Promise<boolean>
  • Appends the specified element to the end of the list.

    Parameters

    • element: E

      element to be added

    Returns Promise<boolean>

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

addAll

  • addAll(elements: E[]): Promise<boolean>
  • Appends all elements in the specified array to the end of this list,

    Parameters

    • elements: E[]

      array to be appended

    Returns Promise<boolean>

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

addAllAt

  • addAllAt(index: number, elements: E[]): 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.

    Parameters

    • index: number

      position at which the array's elements should be inserted

    • elements: E[]

      array to be inserted

    Returns Promise<boolean>

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

addAt

  • addAt(index: number, element: E): Promise<void>
  • 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>

addItemListener

  • addItemListener(listener: ItemListener<E>, includeValue: boolean): Promise<string>
  • Adds an item listener for this list. Listener will be invoked whenever an item is added to or removed from this list.

    Parameters

    • listener: ItemListener<E>

      object with listener functions

    • includeValue: boolean

      true if updated item should be included in the event.

    Returns Promise<string>

    registration ID of the listener.

clear

  • clear(): Promise<void>

contains

  • contains(element: E): Promise<boolean>
  • Checks if the list contains given element.

    Parameters

    • element: E

    Returns Promise<boolean>

    true if this list contains an element that is equal the to given element, false otherwise.

containsAll

  • containsAll(elements: E[]): Promise<boolean>
  • Checks if the list contains all of the given elements.

    Parameters

    • elements: E[]

      elements to be checked for presence in this list.

    Returns Promise<boolean>

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

destroy

  • destroy(): Promise<void>

get

  • get(index: number): Promise<E>
  • Retrieves the element at given location.

    Parameters

    • index: number

      index of the element to return.

    Returns Promise<E>

    the element at that position.

getName

  • getName(): string

getPartitionKey

  • getPartitionKey(): string

getServiceName

  • getServiceName(): string

indexOf

  • indexOf(element: E): Promise<number>
  • Returns the position of first occurrence of the given element in this list.

    Parameters

    • element: E

      element to search for

    Returns Promise<number>

    the index of first occurrence of given element or -1 if the list does not contain given element.

isEmpty

  • isEmpty(): Promise<boolean>
  • Checks if this list is empty.

    Returns Promise<boolean>

    true if this list contains no elements, false otherwise.

lastIndexOf

  • lastIndexOf(element: E): Promise<number>
  • Returns position of the last occurrence of the given element in this list.

    Parameters

    • element: E

    Returns Promise<number>

remove

  • remove(element: E): Promise<boolean>
  • Removes the given element from this list.

    Parameters

    • element: E

      element to be removed

    Returns Promise<boolean>

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

removeAll

  • removeAll(elements: E[]): Promise<boolean>
  • Removes given elements from the list.

    Parameters

    • elements: E[]

      elements to be removed

    Returns Promise<boolean>

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

removeAt

  • removeAt(index: number): Promise<E>
  • Removes the element at the given index.

    Parameters

    • index: number

      index of the element to be removed.

    Returns Promise<E>

    the removed element.

removeItemListener

  • removeItemListener(listenerId: string): Promise<boolean>
  • Removes an ItemListener from this list.

    Parameters

    • listenerId: string

      registration ID of the listener to be removed.

    Returns Promise<boolean>

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

retainAll

  • retainAll(elements: E[]): Promise<boolean>
  • Removes all elements from this list except the ones contained in the given array.

    Parameters

    • elements: E[]

      elements to retain

    Returns Promise<boolean>

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

set

  • set(index: number, element: E): Promise<E>
  • Replaces the element at the specified position in this list with the specified element.

    Parameters

    • index: number

      position of the element to be replaced

    • element: E

      replacement element

    Returns Promise<E>

    previous element at the given index.

size

  • size(): Promise<number>
  • Returns the number of elements in this list.

    Returns Promise<number>

subList

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

    Parameters

    • start: number

      start of the view

    • end: number

      end of the view

    Returns Promise<ReadOnlyLazyList<E>>

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

toArray

  • toArray(): Promise<E[]>
  • Returns an array that contains all elements of this list in proper sequence.

    Returns Promise<E[]>

Generated using TypeDoc