Add array to collection
import java.util.Arrays; import java.util.Collection; public class Util{ public static <T> void addArrayToCollection(T[] array, Collection<T> collection) { collection.addAll(Arrays.asList(array)); } }