43 |
|
* <p>Beware that, unlike in most collections, the {@code size} method |
44 |
|
* is <em>NOT</em> a constant-time operation. Because of the |
45 |
|
* asynchronous nature of these queues, determining the current number |
46 |
< |
* of elements requires a traversal of the elements. |
46 |
> |
* of elements requires a traversal of the elements, and so may report |
47 |
> |
* inaccurate results if this collection is modified during traversal. |
48 |
> |
* Additionally, the bulk operations <tt>addAll</tt>, |
49 |
> |
* <tt>removeAll</tt>, <tt>retainAll</tt>, <tt>containsAll</tt>, |
50 |
> |
* <tt>equals</tt>, and <tt>toArray</tt> are <em>not</em> guaranteed |
51 |
> |
* to be performed atomically. For example, an iterator operating |
52 |
> |
* concurrently with an <tt>addAll</tt> operation might view only some |
53 |
> |
* of the added elements. |
54 |
|
* |
55 |
|
* <p>This class and its iterator implement all of the <em>optional</em> |
56 |
|
* methods of the {@link Queue} and {@link Iterator} interfaces. |