Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Queue<T>

Type parameters

  • T

Hierarchy

  • Queue

Index

Constructors

constructor

  • new Queue(initial?: T[]): Queue
  • Parameters

    • Optional initial: T[]

    Returns Queue

Methods

dequeue

  • dequeue(): T | undefined
  • Returns T | undefined

enqueue

  • enqueue(value: T): void
  • Parameters

    • value: T

    Returns void

getLength

  • getLength(): number
  • Returns number

isEmpty

  • isEmpty(): boolean
  • Returns boolean

isInQueue

  • isInQueue(item: T, equals?: function): boolean
  • Parameters

    • item: T
    • Optional equals: function
        • (item1: T, item2: T): boolean
        • Parameters

          • item1: T
          • item2: T

          Returns boolean

    Returns boolean

Generated using TypeDoc