Returns true if queue is empty
Is queue full? Returns false if no capacity has been set
Number of items in queue
Adds event listener.
Events
Event name
Event handler
Enqueues (adds items to back of queue). If a capacity is set, not all items might be added.
Rest
...toAdd: readonly V[]How many items were added
Protected
fireFire event
Type of event
Arguments for event
Protected
onProtected
onProtected
onRemove event listener
Mutable queue that fires events when manipulated.
Queues are useful if you want to treat 'older' or 'newer' items differently. Enqueing adds items at the back of the queue, while dequeing removes items from the front (ie. the oldest).
Example: Cap size to 5 items, throwing away newest items already in queue.
Events can be used to monitor data flows.
Each of the event handlers return the state of the queue as the 'finalData' field.