Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static <T> void addAll(Collection<T> collection, Collection<T> items) { if (items != null) { collection.addAll(items); } } }