Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • IKavenStack

Implemented by

Index

Properties

Methods

Properties

Count

Count: number

Gets the number of elements contained in the stack.

Methods

Clear

  • Clear(): void
  • Removes all objects from the stack.

    Returns void

Contains

  • Contains(item: T): boolean
  • Determines whether an element is in the stack.

    Parameters

    • item: T

    Returns boolean

    true if item is found in the stack; otherwise, false.

Peek

  • Peek(): undefined | T
  • Returns the object at the top of the stack without removing it.

    Returns undefined | T

    The object at the top of the stack.

Pop

  • Pop(): undefined | T
  • Removes and returns the object at the top of the stack.

    Returns undefined | T

    The object removed from the top of the stack.

Push

  • Push(item: T): void
  • Inserts an object at the top of the stack.

    Parameters

    • item: T

    Returns void

ToArray

  • ToArray(): T[]
  • Copies the stack to a new array.

    Returns T[]

    A new array containing copies of the elements of the stack.

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Property
  • Method
  • Class
  • Class with type parameter
  • Enumeration

Generated using TypeDoc