--- jsr166/src/main/java/util/PriorityQueue.java 2011/07/13 11:27:28 1.74 +++ jsr166/src/main/java/util/PriorityQueue.java 2013/01/16 01:59:47 1.80 @@ -56,14 +56,14 @@ package java.util; * the priority queue in any particular order. If you need ordered * traversal, consider using {@code Arrays.sort(pq.toArray())}. * - *
Note that this implementation is not synchronized. + *
Note that this implementation is not synchronized. * Multiple threads should not access a {@code PriorityQueue} * instance concurrently if any of the threads modifies the queue. * Instead, use the thread-safe {@link * java.util.concurrent.PriorityBlockingQueue} class. * *
Implementation note: this implementation provides
- * O(log(n)) time for the enqueing and dequeing methods
+ * O(log(n)) time for the enqueuing and dequeuing methods
* ({@code offer}, {@code poll}, {@code remove()} and {@code add});
* linear time for the {@code remove(Object)} and {@code contains(Object)}
* methods; and constant time for the retrieval methods
@@ -77,6 +77,7 @@ package java.util;
* @author Josh Bloch, Doug Lea
* @param Suppose x is a queue known to contain only strings.
+ * Suppose {@code x} is a queue known to contain only strings.
* The following code can be used to dump the queue into a newly
- * allocated array of String:
+ * allocated array of {@code String}:
*
* {@code String[] y = x.toArray(new String[0]);}
*
- * Note that toArray(new Object[0]) is identical in function to
- * toArray().
+ * Note that {@code toArray(new Object[0])} is identical in function to
+ * {@code toArray()}.
*
* @param a the array into which the elements of the queue are to
* be stored, if it is big enough; otherwise, a new array of the
@@ -724,16 +725,14 @@ public class PriorityQueue