34 |
|
* non-comparable objects (doing so results in |
35 |
|
* {@code ClassCastException}). |
36 |
|
* |
37 |
< |
* <p>This class and its iterator implement all of the |
38 |
< |
* <em>optional</em> methods of the {@link Collection} and {@link |
39 |
< |
* Iterator} interfaces. The Iterator provided in method {@link |
40 |
< |
* #iterator()} and the Spliterator provided in method {@link #spliterator()} |
41 |
< |
* are <em>not</em> guaranteed to traverse the elements of |
42 |
< |
* the PriorityBlockingQueue in any particular order. If you need |
43 |
< |
* ordered traversal, consider using |
44 |
< |
* {@code Arrays.sort(pq.toArray())}. Also, method {@code drainTo} |
45 |
< |
* can be used to <em>remove</em> some or all elements in priority |
46 |
< |
* order and place them in another collection. |
37 |
> |
* <p>This class and its iterator implement all of the <em>optional</em> |
38 |
> |
* methods of the {@link Collection} and {@link Iterator} interfaces. |
39 |
> |
* The Iterator provided in method {@link #iterator()} and the |
40 |
> |
* Spliterator provided in method {@link #spliterator()} are <em>not</em> |
41 |
> |
* guaranteed to traverse the elements of the PriorityBlockingQueue in |
42 |
> |
* any particular order. If you need ordered traversal, consider using |
43 |
> |
* {@code Arrays.sort(pq.toArray())}. Also, method {@code drainTo} can |
44 |
> |
* be used to <em>remove</em> some or all elements in priority order and |
45 |
> |
* place them in another collection. |
46 |
|
* |
47 |
|
* <p>Operations on this class make no guarantees about the ordering |
48 |
|
* of elements with equal priority. If you need to enforce an |