addAll
Adds all of the elements in the specified collection to this queue. Attempts to addAll of a queue to itself result in IllegalArgumentException. Further, the behavior of this operation is undefined if the specified collection is modified while the operation is in progress.
This implementation iterates over the specified collection, and adds each element returned by the iterator to this queue, in turn. A runtime exception encountered while trying to add an element (including, in particular, a null element) may result in only some of the elements having been successfully added when the associated exception is thrown.
Return
true if this queue changed as a result of the call
Parameters
collection containing elements to be added to this queue
See also
.add
Throws
if the class of an element of the specified collection prevents it from being added to this queue
if the specified collection contains a null element and this queue does not permit null elements, or if the specified collection is null
if some property of an element of the specified collection prevents it from being added to this queue, or if the specified collection is this queue
if not all the elements can be added at this time due to insertion restrictions