Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { static <V> void addAll(final Collection<V> collection, final Iterable<V> values) { if (values != null) { for (final V value : values) { collection.add(value); } } } }