Options
All
  • Public
  • Public/Protected
  • All
Menu

An iterator over a collection.

Type parameters

  • E

Hierarchy

  • CollectionIterator

Implemented by

Index

Methods

forEachRemaining

  • forEachRemaining(f: function): void
  • Executes the given function for each remaining element until all elements have been processed or the function throws an error. Function is applied in the order of iteration, if that order is specified.

    Parameters

    • f: function

      function to apply to each remaining element.

        • (e: E): void
        • Parameters

          • e: E

          Returns void

    Returns void

hasNext

  • hasNext(): boolean
  • Returns true if the iteration has more elements. (In other words, returns true if next() would return an element rather than throwing an error.)

    Returns boolean

    true if the iteration has more elements

next

  • next(): E
  • Returns the next element in the iteration.

    throws

    {Error('No such element')} if the iteration has no more elements

    Returns E

    the next element in the iteration.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc