final class TPriorityQueue[A] extends AnyVal
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.
- Alphabetic
- By Inheritance
- TPriorityQueue
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def isEmpty: USTM[Boolean]
Checks whether the queue is empty.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def nonEmpty: USTM[Boolean]
Checks whether the queue is not empty..
- def offer(a: A): USTM[Unit]
Offers the specified value to the queue.
- def offerAll(values: Iterable[A]): USTM[Unit]
Offers all of the elements in the specified collection to the queue.
- def peek: USTM[A]
Peeks at the first value in the queue without removing it, retrying until a value is in the queue.
- def peekOption: USTM[Option[A]]
Peeks at the first value in the queue without removing it, returning
None
if there is not a value in the queue. - def removeIf(f: (A) => Boolean): USTM[Unit]
Removes all elements from the queue matching the specified predicate.
- def retainIf(f: (A) => Boolean): USTM[Unit]
Retains only elements from the queue matching the specified predicate.
- def size: USTM[Int]
Returns the size of the queue.
- def take: USTM[A]
Takes a value from the queue, retrying until a value is in the queue.
- def takeAll: USTM[Chunk[A]]
Takes all values from the queue.
- def takeOption: USTM[Option[A]]
Takes a value from the queue, returning
None
if there is not a value in the queue. - def takeUpTo(n: Int): USTM[Chunk[A]]
Takes up to the specified maximum number of elements from the queue.
- def toChunk: USTM[Chunk[A]]
Collects all values into a chunk.
- def toList: USTM[List[A]]
Collects all values into a list.
- def toString(): String
- Definition Classes
- Any
- def toVector: USTM[Vector[A]]
Collects all values into a vector.