26 |
|
package java.util; |
27 |
|
import java.util.function.Consumer; |
28 |
|
import java.util.stream.Stream; |
29 |
– |
import java.util.stream.Streams; |
29 |
|
|
30 |
|
/** |
31 |
|
* An unbounded priority {@linkplain Queue queue} based on a priority heap. |
65 |
|
* java.util.concurrent.PriorityBlockingQueue} class. |
66 |
|
* |
67 |
|
* <p>Implementation note: this implementation provides |
68 |
< |
* O(log(n)) time for the enqueing and dequeing methods |
68 |
> |
* O(log(n)) time for the enqueuing and dequeuing methods |
69 |
|
* ({@code offer}, {@code poll}, {@code remove()} and {@code add}); |
70 |
|
* linear time for the {@code remove(Object)} and {@code contains(Object)} |
71 |
|
* methods; and constant time for the retrieval methods |
743 |
|
* emitted (int), followed by all of its elements |
744 |
|
* (each an {@code Object}) in the proper order. |
745 |
|
* @param s the stream |
746 |
+ |
* @throws java.io.IOException if an I/O error occurs |
747 |
|
*/ |
748 |
|
private void writeObject(java.io.ObjectOutputStream s) |
749 |
|
throws java.io.IOException { |
763 |
|
* (that is, deserializes it). |
764 |
|
* |
765 |
|
* @param s the stream |
766 |
+ |
* @throws ClassNotFoundException if the class of a serialized object |
767 |
+ |
* could not be found |
768 |
+ |
* @throws java.io.IOException if an I/O error occurs |
769 |
|
*/ |
770 |
|
private void readObject(java.io.ObjectInputStream s) |
771 |
|
throws java.io.IOException, ClassNotFoundException { |