|
Scala Library
|
|
class
SynchronizedPriorityQueue[A](implicit ord : Ordering[A])
extends PriorityQueue[A]Ordered[T] class.| Method Summary | |
override def
|
++=
(it : Iterator[A]) : SynchronizedPriorityQueue[A]
Adds all elements provided by an iterator into the priority queue.
|
def
|
++=
(iter : Iterable[A]) : SynchronizedPriorityQueue[A]
Adds all elements provided by an
Iterable object
into the priority queue. |
override def
|
+=
(elem : A) : SynchronizedPriorityQueue[A]
Inserts a single element into the priority queue.
|
override def
|
clear
: Unit
Removes all elements from the queue. After this operation is completed,
the queue will be empty.
|
override def
|
dequeue
: A
Returns the element with the highest priority in the queue,
and removes this element from the queue.
|
override def
|
enqueue
(elems : A*) : Unit
Adds all elements to the queue.
|
override def
|
equals
(that : Any) : Boolean
Checks if two queues are structurally identical.
|
override def
|
isEmpty
: Boolean
Checks if the queue is empty.
|
override def
|
iterator
: Iterator[A]
Returns an iterator which yiels all the elements of the priority
queue in descending priority order.
|
override def
|
max
: A
Returns the element with the highest priority in the queue,
or throws an error if there is no element contained in the queue.
|
override def
|
toString
: java.lang.String
Returns a textual representation of a queue as a string.
|
| Methods inherited from PriorityQueue | |
| newBuilder, length, size, repr, foreach, update, apply, result, fixUp, fixDown, +, +, ++, ++, reverse, reverseIterator, hashCode, toQueue, toList, clone |
| Methods inherited from Builder | |
| sizeHint, mapResult |
| Methods inherited from Growable | |
| +=, ++= |
| Methods inherited from Seq | |
| companion |
| Methods inherited from SeqLike | |
| thisCollection, toCollection, lengthCompare, isDefinedAt, segmentLength, prefixLength, indexWhere, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, reverseMap, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, updated, +:, :+, padTo, sortWith, sortWith, sortBy, toSeq, indices, view, view, findLastIndexOf, equalsWith, containsSlice, projection |
| Methods inherited from PartialFunction | |
| orElse, andThen |
| Methods inherited from Function1 | |
| compose |
| Methods inherited from IterableLike | |
| elements, forall, exists, find, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, first, firstOption |
| Methods inherited from GenericTraversableTemplate | |
| genericBuilder, unzip, flatten, transpose |
| Methods inherited from TraversableLike | |
| nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, stringPrefix, withFilter |
| Methods inherited from AnyRef | |
| getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Method Details |
override
def
isEmpty : Boolean
override
def
+=(elem : A) : SynchronizedPriorityQueue[A]
elem - the element to insert
def
++=(iter : Iterable[A]) : SynchronizedPriorityQueue[A]
Iterable object
into the priority queue.iter - an iterable objectoverride
def
++=(it : Iterator[A]) : SynchronizedPriorityQueue[A]
it - an iteratorelems - the elements to add.override
def
dequeue : A
override
def
max : A
override
def
clear : Unit
override
def
toString : java.lang.String
|
Scala Library
|
|