PriorityQueue class

Class for representing a binary heap priority queue that enables more efficient sorting of arrays. The implementation is based on { @link https://github.com/mourner/tinyqueue tinyqueue}.

@author {@link https://github.com/Mugen87|Mugen87}

Constructors

PriorityQueue([Function? compare])
Constructs a new priority queue.

Properties

compare Function
getter/setter pair
data List
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
length int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

defaultCompare(dynamic a, dynamic b) → dynamic
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek() → dynamic
Returns the item with the highest priority without removal.
pop() → dynamic
Returns the item with the highest priority and removes it from the priority queue.
push(dynamic item) → void
Pushes an item to the priority queue.
toString() String
A string representation of this object.
inherited

Operators

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