JDK源码详解之​​List​​接口【updating…】

1.

2. 方法

boolean addAll(Collection<? extends E> c)

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)

Specified by:
addAll in interface Collection<E>
Parameters:
c - collection containing elements to be added to this list
Returns:
true if this list changed as a result of the call

Throws:
UnsupportedOperationException - if the addAll operation is not supported by this list
ClassCastException - if the class of an element of the specified collection prevents it from being added to this list
NullPointerException - if the specified collection contains one or more null elements and this list does not permit null elements, or if the specified collection is null
IllegalArgumentException - if some property of an element of the specified collection prevents it from being added to this list

See Also:
add(Object)