Java examples for java.util:Iterable Element
add All elements from Iterable to Collection
//package com.java2s; 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);/*from w w w .ja va 2s . c o m*/ } } } }