E> class Null safety
A priority queue is a priority based work-list of elements.
The queue allows adding elements, and removing them again in priority order.
The same object can be added to the queue more than once.
There is no specified ordering for objects with the same priority
comparison function returns zero).
Operations which care about object equality, contains and remove,
use Object.== for testing equality.
In most situations this will be the same as identity (identical),
but there are types, like String, where users can reasonably expect
distinct objects to represent the same value.
If elements override Object.==, the
comparison function must
always give equal objects the same priority,
otherwise contains or remove might not work correctly.
- first → E
Returns the next element that will be returned by removeFirst. [...]
- hashCode → int
The hash code for this object. [...]
- isEmpty → bool
Whether the queue is empty.
- isNotEmpty → bool
Whether the queue has any elements.
- length → int
Number of elements in the queue.
- runtimeType → Type
A representation of the runtime type of the object.
Provides efficient access to all the elements curently in the queue. [...]
E element) → void
- Adds element to the queue. [...]
Iterable< E>elements) → void
elementsto the queue.
) → void
- Removes all the elements from this queue.
E object) → bool
objectis in the queue. [...]
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
E element) → bool
Removes an element of the queue that compares equal to
) → Iterable< E>
- Removes all the elements from this queue and returns them. [...]
) → E
- Removes and returns the element with the highest priority. [...]
) → List< E>
- Returns a list of the elements of this queue in priority order. [...]
) → Set< E>
- Return a comparator based set using the comparator of this queue. [...]
) → String
A string representation of this object. [...]
) → List< E>
- Returns a list of the elements of this queue in no specific order. [...]