Instantiate the queue, optionally with a list of items to start from.
The list of linkers to start in this queue (the first is the front)
The type of list to create when no queued list is given
The class used to hold each queued item
Iterate over the items from the front of the queue to the back, without removing them.
Check whether the queue has no items.
Add an item to the back of the queue.
The item to add
This queue, so that adding can be chained
Look at the item at the front of the queue, without removing it.
The item, or null when the queue is empty
Count the items in the queue.
Staticfrom
A first-in-first-out collection: items are added to the back with enqueue and taken from the front with dequeue. Any value can be queued (it is stored as it is, whether it is a function, an object or null), and adding and taking are constant time. To queue tasks which are run as they are taken use TaskQueue.