PriorityQueue<T extends Comparable<T>> class

Priority queue implementation using heap

Constructors

PriorityQueue()

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Check if empty
no setter
isNotEmpty bool
Check if not empty
no setter
length int
Get queue size
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(T item) → void
Add item to queue
clear() → void
Clear the queue
contains(T item) bool
Check if contains item
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek() → T?
Peek at highest priority item without removing
remove(T item) bool
Remove specific item
removeFirst() → T?
Remove and return highest priority item
toList() List<T>
Get all items as list (sorted by priority)
toString() String
A string representation of this object.
inherited

Operators

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