--- jsr166/src/main/java/util/PriorityQueue.java 2016/08/24 21:46:18 1.110 +++ jsr166/src/main/java/util/PriorityQueue.java 2016/11/29 18:11:28 1.112 @@ -54,7 +54,8 @@ import java.util.function.Consumer; *

This class and its iterator implement all of the * optional methods of the {@link Collection} and {@link * Iterator} interfaces. The Iterator provided in method {@link - * #iterator()} is not guaranteed to traverse the elements of + * #iterator()} and the Spliterator provided in method {@link #spliterator()} + * are not guaranteed to traverse the elements of * the priority queue in any particular order. If you need ordered * traversal, consider using {@code Arrays.sort(pq.toArray())}. * @@ -726,6 +727,7 @@ public class PriorityQueue extends Ab /** * Establishes the heap invariant (described above) in the entire tree, * assuming nothing about the order of the elements prior to the call. + * This classic algorithm due to Floyd (1964) is known to be O(size). */ @SuppressWarnings("unchecked") private void heapify() { @@ -799,7 +801,8 @@ public class PriorityQueue extends Ab /** * Creates a late-binding * and fail-fast {@link Spliterator} over the elements in this - * queue. + * queue. The spliterator does not traverse elements in any particular order + * (the {@link Spliterator#ORDERED ORDERED} characteristic is not reported). * *

The {@code Spliterator} reports {@link Spliterator#SIZED}, * {@link Spliterator#SUBSIZED}, and {@link Spliterator#NONNULL}.