Type Parameters

  • T

Hierarchy

Implements

Constructors

Properties

#count: number
#current?: LinkedListItem<T>
#root?: LinkedListItem<T>

Accessors

Methods

  • Returns true if any of the items match the predicate, otherwise false

    Parameters

    Returns boolean

    Example

    if (myEnumerable.any()) {
    // do something because the enumerable has elements
    }
    let myEnumerable = new ArrayEnumerable([1, 2, 3, 4]);
    if (myEnumerable.any((i) => i == 2)) {
    // the enumerable contains a '2'
    }
  • Copies the elements of the ICollection to an Array, starting at a particular Array index.

    Parameters

    • array: T[]

      The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.

    • arrayIndex: number

      The zero-based index in array at which copying begins.

    Returns void

  • Iterates over the enumerable and performs the callback on each item. Return false to break.

    Parameters

    • callback: ((value, index) => boolean | void)
        • (value, index): boolean | void
        • Parameters

          • value: T
          • index: number

          Returns boolean | void

    Returns void

  • Traverse the collection, return false in the callback to break. return true or undefined to continue.

    Parameters

    Returns void

Generated using TypeDoc