Java tutorial
//package com.java2s; import java.util.Arrays; import java.util.Collection; public class Main { public static final <T> void add(Collection<T> collection, T... values) { if (values == null || values.length == 0) { return; } collection.addAll(Arrays.asList(values)); } }