GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • algorithms-ts
  • Options
  • AbstractCollection
  • AbstractIterator
  • AdjacencyListDigraph
  • ArrayIterator
  • BreadthFirstDirectedPaths
  • DepthFirstDirectedPaths
  • DepthFirstOrderDFS
  • DigraphBFS
  • DigraphDFS
  • DirectedDFS
  • DirectedEulerianCycleDFS
  • DirectedEulerianPathDFS

This view

  • Original page
  • New address

GeezerVison is showing prishedko.github.io — ArrayCollection | algorithms-ts

Implementation of Collection that uses an array to store elements. Can either copy given array or reuse it - this behavior is defined by copyArray parameter of the constructor.

Type parameters

  • E

Hierarchy

  • ArrayCollection

Implements

  • Collection<E>

Index

Constructors

  • constructor

Properties

  • array

Methods

  • every
  • filter
  • find
  • forEach
  • iterator
  • map
  • reduce
  • size
  • some

Constructors

constructor

  • new ArrayCollection(from?: E[], copyArray?: boolean): ArrayCollection
    • Defined in commons/ArrayCollection.ts:12

    Parameters

    • Default value from: E[] = []
    • Default value copyArray: boolean = true

    Returns ArrayCollection

Properties

Private array

array: E[]
  • Defined in commons/ArrayCollection.ts:12

Methods

every

  • every(p: function): boolean
    • Defined in commons/ArrayCollection.ts:46

    Parameters

    • p: function
        • (e: E): boolean
        • Parameters

          • e: E

          Returns boolean

    Returns boolean

filter

  • filter(p: function): Collection<E>
    • Defined in commons/ArrayCollection.ts:26

    Parameters

    • p: function
        • (e: E): boolean
        • Parameters

          • e: E

          Returns boolean

    Returns Collection<E>

find

  • find(p: function): E | undefined
    • Defined in commons/ArrayCollection.ts:42

    Parameters

    • p: function
        • (e: E): boolean
        • Parameters

          • e: E

          Returns boolean

    Returns E | undefined

forEach

  • forEach(f: function): void
    • Defined in commons/ArrayCollection.ts:30

    Parameters

    • f: function
        • (e: E): void
        • Parameters

          • e: E

          Returns void

    Returns void

iterator

  • iterator(): CollectionIterator<E>
  • Implementation of Collection.iterator

    • Defined in commons/ArrayCollection.ts:54

    Returns CollectionIterator<E>

map

  • map<T>(f: function): Collection<T>
    • Defined in commons/ArrayCollection.ts:22

    Type parameters

    • T

    Parameters

    • f: function
        • (e: E): T
        • Parameters

          • e: E

          Returns T

    Returns Collection<T>

reduce

  • reduce<A>(r: function, initialValue: A): A
    • Defined in commons/ArrayCollection.ts:34

    Type parameters

    • A

    Parameters

    • r: function
        • (accumulator: A, currentElement: E): A
        • Parameters

          • accumulator: A
          • currentElement: E

          Returns A

    • initialValue: A

    Returns A

size

  • size(): number
  • Implementation of Collection.size

    • Defined in commons/ArrayCollection.ts:38

    Returns number

some

  • some(p: function): boolean
    • Defined in commons/ArrayCollection.ts:50

    Parameters

    • p: function
        • (e: E): boolean
        • Parameters

          • e: E

          Returns boolean

    Returns boolean

Generated using TypeDoc

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.