@SafeVarargs
public static <T> boolean addAll (Collection<? super T> c, T… elements)

Adds all of the specified elements to the specified collection. Elements to be added may be specified individually or as an array. The behavior of this convenience method is identical to that of c.addAll(Arrays.asList(elements)), but this method is likely to run significantly faster under most implementations.

When elements are specified individually, this method provides a convenient way to add a few elements to an existing collection:

     Collections.addAll(flavors, "Peaches 'n Plutonium", "Rocky Racoon");
 

Parameters:
<T>    the class of the elements to add and of the collection
c    the collection into which elements are to be inserted
elements    the elements to insert into c

Returns:  true if the collection changed as a result of the call

Exceptions:
UnsupportedOperationException    if c does not support the add operation
NullPointerException    if elements contains one or more null values and c does not permit null elements, or if c or elements are null
IllegalArgumentException    if some property of a value in elements prevents it from being added to c

See also:
Collection.addAll(Collection)

Since:  1.5