A TPriorityQueue
contains values of type A
that an Ordering
is defined
on. Unlike a TQueue
, take
returns the highest priority value (the value
that is first in the specified ordering) as opposed to the first value
offered to the queue. The ordering that elements with the same priority will
be taken from the queue is not guaranteed.
- Companion:
- object
Value members
Concrete methods
Offers all of the elements in the specified collection to the queue.
Offers all of the elements in the specified collection to the queue.
Peeks at the first value in the queue without removing it, retrying until a value is in the queue.
Peeks at the first value in the queue without removing it, retrying until a value is in the queue.
Peeks at the first value in the queue without removing it, returning None
if there is not a value in the queue.
Peeks at the first value in the queue without removing it, returning None
if there is not a value in the queue.
Removes all elements from the queue matching the specified predicate.
Removes all elements from the queue matching the specified predicate.
Retains only elements from the queue matching the specified predicate.
Retains only elements from the queue matching the specified predicate.
Takes a value from the queue, retrying until a value is in the queue.
Takes a value from the queue, retrying until a value is in the queue.
Takes a value from the queue, returning None
if there is not a value in
the queue.
Takes a value from the queue, returning None
if there is not a value in
the queue.