Here you can find the source of addElements(List
public static <T> boolean addElements(List<T> list, T[] array)
//package com.java2s; import java.util.List; public class Main { public static <T> boolean addElements(List<T> list, T[] array) { boolean good = true; for (T obj : array) { good &= list.add(obj);// w w w.j av a 2s . co m } return good; } }