3498 |
|
* </pre> |
3499 |
|
* |
3500 |
|
* @param c the collection into which <tt>elements</tt> are to be inserted |
3501 |
< |
* @param a the elements to insert into <tt>c</tt> |
3501 |
> |
* @param elements the elements to insert into <tt>c</tt> |
3502 |
|
* @return <tt>true</tt> if the collection changed as a result of the call |
3503 |
|
* @throws UnsupportedOperationException if <tt>c</tt> does not support |
3504 |
< |
* the <tt>add</tt> operation. |
3504 |
> |
* the <tt>add</tt> operation |
3505 |
|
* @throws NullPointerException if <tt>elements</tt> contains one or more |
3506 |
|
* null values and <tt>c</tt> does not permit null elements, or |
3507 |
|
* if <tt>c</tt> or <tt>elements</tt> are <tt>null</tt> |
3510 |
|
* @see Collection#addAll(Collection) |
3511 |
|
* @since 1.5 |
3512 |
|
*/ |
3513 |
< |
public static <T> boolean addAll(Collection<? super T> c, T... a) { |
3513 |
> |
public static <T> boolean addAll(Collection<? super T> c, T... elements) { |
3514 |
|
boolean result = false; |
3515 |
< |
for (T e : a) |
3516 |
< |
result |= c.add(e); |
3515 |
> |
for (T element : elements) |
3516 |
> |
result |= c.add(element); |
3517 |
|
return result; |
3518 |
|
} |
3519 |
|
|