Java tutorial
//package com.java2s; import java.util.Set; public class Main { public static <T> void setAddAll(Set<T> set, T[] array) { for (T t : array) set.add(t); } }