Here you can find the source of addAll(Collection super T> col, Iterable extends T> iterable)
public static <T> boolean addAll(Collection<? super T> col, Iterable<? extends T> iterable)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static <T> boolean addAll(Collection<? super T> col, Iterable<? extends T> iterable) { boolean celkovaZmena = false; for (T tt : iterable) { boolean zmena = col.add(tt); celkovaZmena = celkovaZmena || zmena; }// www . j a v a2 s . c o m return celkovaZmena; } }