19 |
|
* ordering also does not permit insertion of non-comparable objects |
20 |
|
* (doing so results in <tt>ClassCastException</tt>). |
21 |
|
* |
22 |
– |
* <p>This class implements all of the <em>optional</em> methods |
23 |
– |
* of the {@link Collection} and {@link Iterator} interfaces. |
24 |
– |
* <p>The Iterator provided in method {@link #iterator()} is |
25 |
– |
* <em>not</em> guaranteed to traverse the elements of the |
26 |
– |
* PriorityBlockingQueue in any particular order. If you need ordered |
27 |
– |
* traversal, consider using <tt>Arrays.sort(pq.toArray())</tt>. |
28 |
– |
* |
22 |
|
* <p>This class and its iterator implement all of the |
23 |
|
* <em>optional</em> methods of the {@link Collection} and {@link |
24 |
|
* Iterator} interfaces. |
25 |
+ |
* The Iterator provided in method {@link #iterator()} is |
26 |
+ |
* <em>not</em> guaranteed to traverse the elements of the |
27 |
+ |
* PriorityBlockingQueue in any particular order. If you need ordered |
28 |
+ |
* traversal, consider using <tt>Arrays.sort(pq.toArray())</tt>. |
29 |
|
* |
30 |
|
* <p>This class is a member of the |
31 |
|
* <a href="{@docRoot}/../guide/collections/index.html"> |
274 |
|
|
275 |
|
/** |
276 |
|
* Removes a single instance of the specified element from this |
277 |
< |
* collection, if it is present. |
277 |
> |
* queue, if it is present. |
278 |
|
*/ |
279 |
|
public boolean remove(Object o) { |
280 |
|
final ReentrantLock lock = this.lock; |