Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Implements

Index

Properties

Private stackSize

stackSize: number = 0

Private topOfStack

topOfStack: Node<E> = undefined

Methods

asCollection

every

  • every(p: function): boolean

filter

find

  • find(p: function): E | undefined

forEach

  • forEach(f: function): void

isEmpty

  • isEmpty(): boolean

iterator

map

peek

  • peek(): E

pop

  • pop(): E

push

  • push(element: E): Stack<E>

reduce

  • reduce<A>(r: function, initialValue: A): A

size

  • size(): number

some

  • some(p: function): boolean

toString

  • toString(): string

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