Skip to content

@toolcog/util/queue

Toolcog utilities

Classes

FifoQueue<T>

Type Parameters

T

Implements

Constructors

new FifoQueue()

new FifoQueue<T>(): FifoQueue<T>

Returns

FifoQueue<T>

Defined in

fifo-queue.ts:18

Accessors

size

get size(): number

Returns

number

Implementation of

Queue.size

Defined in

fifo-queue.ts:24

Methods

dequeue()

dequeue(): undefined | T

Returns

undefined | T

Implementation of

Queue.dequeue

Defined in

fifo-queue.ts:36

enqueue()

enqueue(value): void

Parameters

value: T

Returns

void

Implementation of

Queue.enqueue

Defined in

fifo-queue.ts:52

isEmpty()

isEmpty(): boolean

Returns

boolean

Implementation of

Queue.isEmpty

Defined in

fifo-queue.ts:28

peek()

peek(): undefined | T

Returns

undefined | T

Implementation of

Queue.peek

Defined in

fifo-queue.ts:32


PriorityQueue<T>

Type Parameters

T

Implements

Constructors

new PriorityQueue()

new PriorityQueue<T>(): PriorityQueue<T>

Returns

PriorityQueue<T>

Defined in

priority-queue.ts:26

Accessors

size

get size(): number

Returns

number

Implementation of

Queue.size

Defined in

priority-queue.ts:31

Methods

dequeue()

dequeue(): undefined | T

Returns

undefined | T

Implementation of

Queue.dequeue

Defined in

priority-queue.ts:43

enqueue()

enqueue(value, priority): void

Parameters

value: T

priority: number = 0

Returns

void

Implementation of

Queue.enqueue

Defined in

priority-queue.ts:59

isEmpty()

isEmpty(): boolean

Returns

boolean

Implementation of

Queue.isEmpty

Defined in

priority-queue.ts:35

peek()

peek(): undefined | T

Returns

undefined | T

Implementation of

Queue.peek

Defined in

priority-queue.ts:39

Interfaces

Queue<T>

Type Parameters

T

Accessors

size

get size(): number

Returns

number

Defined in

queue.ts:2

Methods

dequeue()

dequeue(): undefined | T

Returns

undefined | T

Defined in

queue.ts:8

enqueue()

enqueue(value, priority?): void

Parameters

value: T

priority?: number

Returns

void

Defined in

queue.ts:10

isEmpty()

isEmpty(): boolean

Returns

boolean

Defined in

queue.ts:4

peek()

peek(): undefined | T

Returns

undefined | T

Defined in

queue.ts:6