Java examples for java.util:Iterable Element
add All Iterable<T> to Collection<T>
import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Random; public class Main{ public static <T> void addAll(Iterable<T> iterable, Collection<T> collection) { for (T item : iterable) collection.add(item);/*from w w w . jav a 2 s .com*/ } }