--- jsr166/src/main/java/util/PriorityQueue.java 2013/03/13 12:38:56 1.94
+++ jsr166/src/main/java/util/PriorityQueue.java 2013/10/22 15:21:30 1.98
@@ -26,7 +26,6 @@
package java.util;
import java.util.function.Consumer;
import java.util.stream.Stream;
-import java.util.stream.Streams;
/**
* An unbounded priority {@linkplain Queue queue} based on a priority heap.
@@ -66,7 +65,7 @@ import java.util.stream.Streams;
* 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
@@ -744,6 +743,7 @@ public class PriorityQueue extends Ab
* emitted (int), followed by all of its elements
* (each an {@code Object}) in the proper order.
* @param s the stream
+ * @throws java.io.IOException if an I/O error occurs
*/
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
@@ -763,6 +763,9 @@ public class PriorityQueue extends Ab
* (that is, deserializes it).
*
* @param s the stream
+ * @throws ClassNotFoundException if the class of a serialized object
+ * could not be found
+ * @throws java.io.IOException if an I/O error occurs
*/
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
@@ -823,7 +826,7 @@ public class PriorityQueue extends Ab
}
@SuppressWarnings("unchecked")
- public void forEach(Consumer super E> action) {
+ public void forEachRemaining(Consumer super E> action) {
int i, hi, mc; // hoist accesses and checks from loop
PriorityQueue q; Object[] a;
if (action == null)