Monster.Types. UniqueQueue

An UniqueQueue is a queue that contains items only once.

Constructor

new UniqueQueue()

A queue for unique values

Since
  • 1.4.0
License
  • AGPLv3

Methods

add(value) → {Queue}

Add a new element to the end of the queue.

Add a new element to the end of the queue.

Parameters:
NameTypeDescription
valueobject
Throws:

value is not a object

Type
TypeError
Returns:
Type: 
Queue

clear() → {Queue}

remove all entries

.

remove all entries

Returns:
Type: 
Queue

poll() → {object}

Remove the element at the front of the queue If the queue is empty, return undefined.

Remove the element at the front of the queue If the queue is empty, return undefined.

Returns:
Type: 
object