Options
All
  • Public
  • Public/Protected
  • All
Menu

An iterator that deletes the item when the next method is passed true. Often used with collections when iterating over their items.

// Create a new collection, add some numbers, iterate over them, delete
// those numbers that are odd.
collection = build<number>("hashedUnique");
collection.addAll[1,2,3,4,5,6,7,8,9,10]);
for (let it = collection.values(), result = it.next(), remove = false; !result.done; result = it.next(remove)) {
  console.log("Processing item", result.value);
  remove = result.value % 2 === 1;
}

Type parameters

  • T

    Type of the items over which the iteration is performed.

Hierarchy

Index

Methods

Methods

next

  • next(remove?: undefined | false | true): IteratorResult<T>
  • Parameters

    • Optional remove: undefined | false | true

    Returns IteratorResult<T>

Optional return

  • return(value?: any): IteratorResult<T>
  • Parameters

    • Optional value: any

    Returns IteratorResult<T>

Optional throw

  • throw(e?: any): IteratorResult<T>
  • Parameters

    • Optional e: any

    Returns IteratorResult<T>

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