Here you can find the source of addAll(Iterable
public static <T> void addAll(Iterable<T> iterable, Collection<T> collection)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static <T> void addAll(Iterable<T> iterable, Collection<T> collection) { for (T item : iterable) collection.add(item);/*from w ww. j av a2s . c om*/ } }