Java Collection Add addArrayToCollection(T[] array, Collection collection)

Here you can find the source of addArrayToCollection(T[] array, Collection collection)

Description

add Array To Collection

License

Open Source License

Declaration

public static <T> void addArrayToCollection(T[] array,
            Collection<T> collection) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;

public class Main {
    public static <T> void addArrayToCollection(T[] array,
            Collection<T> collection) {
        for (int i = 0; i < array.length; i++) {
            if (array[i] != null) {
                collection.add(array[i]);
            }//from   w w  w . ja v  a 2 s  . com
        }
    }
}

Related

  1. addAllUncontained(Collection col1, Collection col2)
  2. addAllUnique(final Collection collection, final Collection values)
  3. addArray(Collection col, T[] array)
  4. addArray(java.util.Collection v, T array[])
  5. addArrayToCollection(T[] array, Collection collection)
  6. addCheck(Collection c, Object o)
  7. addCollections(Collection... inCollections)
  8. addCondition(Collection conditions, String condition, double value)
  9. addConditionImpl(Collection conditions, String condition, String value)