PriorityQueue class

A priority queue over a set of {@link Comparable} objects.

@author Martin Davis

Constructors

PriorityQueue()
Creates a new empty priority queue

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Comparable x) → void
Insert into the priority queue. Duplicates are allowed. @param x the item to insert.
clear() → void
Make the priority queue logically empty.
isEmpty() bool
Test if the priority queue is logically empty. @return true if empty, false otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek() Object?
poll() Object?
Remove the smallest item from the priority queue. @return the smallest item, or null if empty
reorder(int hole) → void
Internal method to percolate down in the heap.
size() int
Returns size. @return current size.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited