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
  • ArrayCollection
  • ArrayIterator
  • BreadthFirstDirectedPaths
  • DepthFirstDirectedPaths
  • DepthFirstOrderDFS
  • DigraphBFS
  • DigraphDFS
  • DirectedDFS
  • DirectedEulerianCycleDFS

This view

  • Original page
  • New address

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

This implementation uses a singly-linked list with a non-static nested class for linked-list nodes.

For additional documentation, see Section 1.3 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

Type parameters

  • E

Hierarchy

  • AbstractCollection<E>
    • LinkedStack

Implements

  • Collection<E>
  • Stack<E>

Index

Properties

  • stackSize
  • topOfStack

Methods

  • asCollection
  • every
  • filter
  • find
  • forEach
  • isEmpty
  • iterator
  • map
  • peek
  • pop
  • push
  • reduce
  • size
  • some
  • toString

Properties

Private stackSize

stackSize: number = 0
  • Defined in containers/LinkedStack.ts:17

Private topOfStack

topOfStack: Node<E> = undefined
  • Defined in containers/LinkedStack.ts:18

Methods

asCollection

  • asCollection(): Collection<E>
  • Implementation of Stack.asCollection

    • Defined in containers/LinkedStack.ts:55

    Returns Collection<E>

every

  • every(p: function): boolean
  • Inherited from AbstractCollection.every

    • Defined in commons/AbstractCollection.ts:50

    Parameters

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

          • e: E

          Returns boolean

    Returns boolean

filter

  • filter(p: function): Collection<E>
  • Inherited from AbstractCollection.filter

    • Defined in commons/AbstractCollection.ts:13

    Parameters

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

          • e: E

          Returns boolean

    Returns Collection<E>

find

  • find(p: function): E | undefined
  • Inherited from AbstractCollection.find

    • Defined in commons/AbstractCollection.ts:46

    Parameters

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

          • e: E

          Returns boolean

    Returns E | undefined

forEach

  • forEach(f: function): void
  • Inherited from AbstractCollection.forEach

    • Defined in commons/AbstractCollection.ts:23

    Parameters

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

          • e: E

          Returns void

    Returns void

isEmpty

  • isEmpty(): boolean
  • Implementation of Stack.isEmpty

    • Defined in containers/LinkedStack.ts:47

    Returns boolean

iterator

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

    Overrides AbstractCollection.iterator

    • Defined in containers/LinkedStack.ts:63

    Returns CollectionIterator<E>

map

  • map<T>(f: function): Collection<T>
  • Inherited from AbstractCollection.map

    • Defined in commons/AbstractCollection.ts:7

    Type parameters

    • T

    Parameters

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

          • e: E

          Returns T

    Returns Collection<T>

peek

  • peek(): E
  • Implementation of Stack.peek

    • Defined in containers/LinkedStack.ts:40

    Returns E

pop

  • pop(): E
  • Implementation of Stack.pop

    • Defined in containers/LinkedStack.ts:30

    Returns E

push

  • push(element: E): Stack<E>
  • Implementation of Stack.push

    • Defined in containers/LinkedStack.ts:20

    Parameters

    • element: E

    Returns Stack<E>

reduce

  • reduce<A>(r: function, initialValue: A): A
  • Inherited from AbstractCollection.reduce

    • Defined in commons/AbstractCollection.ts:27

    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 Stack.size

    Overrides AbstractCollection.size

    • Defined in containers/LinkedStack.ts:59

    Returns number

some

  • some(p: function): boolean
  • Inherited from AbstractCollection.some

    • Defined in commons/AbstractCollection.ts:54

    Parameters

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

          • e: E

          Returns boolean

    Returns boolean

toString

  • toString(): string
  • Implementation of Stack.toString

    • Defined in containers/LinkedStack.ts:51

    Returns string

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.