Class: Queue

Queue()

Queue Class

Constructor

new Queue()

Source:

Members

isEmpty

Returns true/false if queue is empty
Source:

peek

Peek next element
Source:

size

Returns number of elements
Source:

Methods

add(val)

Add a new value to the queue
Parameters:
Name Type Description
val any
Source:

clear()

Removes all the elements in the queue
Source:

poll() → {any}

Retrieves and remove next element
Source:
Returns:
element
Type
any

toArray() → {Array}

Converts and return an array from queue
Source:
Returns:
Type
Array