PriorityQueue:
Filter:
Classes | Collections > Ordered

PriorityQueue : Object

Priority queue data structure

Description

PriorityQueue implements a priority queue data structure, which is used to build schedulers. It allows you to put in items at some arbitrary time and pop them in time order.

Class Methods

Inherited class methods

Instance Methods

.put(time, item)

Puts the item in the queue at the given time.

.topPriority

Returns the time of the earliest item in the queue.

.pop

Returns the earliest item in the queue.

.clear

Empty the queue.

.isEmpty

Return a Boolean whether the queue is empty.

.notEmpty

Return a Boolean whether the queue is not empty.

.removeValue(value)

Remove all instances of value from the queue.

Inherited instance methods

Undocumented instance methods

.do(func)

.postpone(time)

Examples