35 |
|
* mapped to {@code removeFirstOccurrence}, and {@link |
36 |
|
* Collection#add} is mapped to {@code addLast}. |
37 |
|
* |
38 |
< |
* <p>Beware that, unlike in most collections, the {@code size} |
38 |
> |
* <p>Beware that, unlike in most collections, the {@link #size} |
39 |
|
* method is <em>NOT</em> a constant-time operation. Because of the |
40 |
|
* asynchronous nature of these deques, determining the current number |
41 |
< |
* of elements requires a traversal of the elements. |
41 |
> |
* of elements requires traversing them all to count them. |
42 |
> |
* Additionally, it is possible for the size to change during |
43 |
> |
* execution of this method, in which case the returned result will be |
44 |
> |
* inaccurate. Thus, this method is typically not very useful in |
45 |
> |
* concurrent applications. |
46 |
|
* |
47 |
|
* <p>This class is {@code Serializable}, but relies on default |
48 |
|
* serialization mechanisms. Usually, it is a better idea for any |