Constructors
constructor
- new default<T>(initial?: T[]): default<T>
-
Methods
dequeue
- dequeue(): undefined | T
-
Returns undefined | T
dequeueAmount
- dequeueAmount(amount: number): T[]
-
Returns T[]
enqueue
- enqueue(value: T): void
-
Returns void
getLength
- getLength(): number
-
Returns number
isEmpty
- isEmpty(): boolean
-
Returns boolean
isInQueue
- isInQueue(item: T, equals?: ((item1: T, item2: T) => boolean)): boolean
-
Parameters
-
item: T
-
Optional
equals: ((item1: T, item2: T) => boolean)
-
- (item1: T, item2: T): boolean
-
Returns boolean
Returns boolean