Java Collection Add addAll(Collection collection, Object[] array)

Here you can find the source of addAll(Collection collection, Object[] array)

Description

add All

License

Open Source License

Declaration

public static void addAll(Collection collection, Object[] array) 

Method Source Code

//package com.java2s;
/*//from   w  ww .ja  va 2 s  . c  o m
 * Copyright 2001-2008 Aqris Software AS. All rights reserved.
 * 
 * This program is dual-licensed under both the Common Development
 * and Distribution License ("CDDL") and the GNU General Public
 * License ("GPL"). You may elect to use one or the other of these
 * licenses.
 */

import java.util.Collection;

public class Main {
    public static void addAll(Collection collection, Object[] array) {
        for (int i = 0, max = array.length; i < max; i++) {
            collection.add(array[i]);
        }
    }
}

Related

  1. add_news(Collection target, Collection to_add)
  2. addAll(C collection, Iterable add)
  3. addAll(C collection, T... elements)
  4. addAll(Collection collection, Iterator iterator)
  5. addAll(Collection collection, Object[] array)
  6. addAll(Collection ret, Object[] elements)
  7. addAll(Collection source, Collection target)
  8. addAll(Collection col, Iterable iterable)
  9. addAll(Collection collection, Iterable toAdd)