diff options
author | Rex Kerr <ichoran@gmail.com> | 2014-09-30 12:57:25 -0700 |
---|---|---|
committer | Rex Kerr <ichoran@gmail.com> | 2014-09-30 12:57:25 -0700 |
commit | 6826a04c7d7ecb158ee92a267558dc261b233e00 (patch) | |
tree | 534db7a373c8fcc1c4d8746a39f73133b4b2921c /src | |
parent | ce7f9f00c2d649f3f9ff3ad11fb2ac91b9094ed3 (diff) | |
download | scala-6826a04c7d7ecb158ee92a267558dc261b233e00.tar.gz scala-6826a04c7d7ecb158ee92a267558dc261b233e00.tar.bz2 scala-6826a04c7d7ecb158ee92a267558dc261b233e00.zip |
SI-8624 PriorityQueue documentation is not clear enough
Added a paragraph explaining that dequeue is the only way to get your elements in priority order.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/mutable/PriorityQueue.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/library/scala/collection/mutable/PriorityQueue.scala b/src/library/scala/collection/mutable/PriorityQueue.scala index b949bec48a..a6e538528a 100644 --- a/src/library/scala/collection/mutable/PriorityQueue.scala +++ b/src/library/scala/collection/mutable/PriorityQueue.scala @@ -16,6 +16,11 @@ import generic._ * To prioritize elements of type A there must be an implicit * Ordering[A] available at creation. * + * Only the `dequeue` and `dequeueAll` methods will return methods in priority + * order (while removing elements from the heap). Standard collection methods + * including `drop` and `iterator` will remove or traverse the heap in whichever + * order seems most convenient. + * * @tparam A type of the elements in this priority queue. * @param ord implicit ordering used to compare the elements of type `A`. * |