Adds all the specified elements to the specified collection. @param c the collection the elements are to be inserted into. @param a the elements to insert. @return true if the collection changed during insertion. @throws UnsupportedOperationException when the metho
(Collection<? super T> c, T... a)
| 2633 | * collection. |
| 2634 | */ |
| 2635 | public static <T> boolean addAll(Collection<? super T> c, T... a) { |
| 2636 | boolean modified = false; |
| 2637 | for (int i = 0; i < a.length; i++) { |
| 2638 | modified |= c.add(a[i]); |
| 2639 | } |
| 2640 | return modified; |
| 2641 | } |
| 2642 | |
| 2643 | /** |
| 2644 | * Returns whether the specified collections have no elements in common. |