Java examples for Collection Framework:ArrayList
union To Array List
//package com.java2s; import java.util.*; public class Main { public static <T> List<T> unionToArrayList( final Collection<T> collection, final T... items) { final ArrayList<T> result = new ArrayList<T>(collection.size() + items.length);/*from w w w .j av a2 s. co m*/ result.addAll(collection); Collections.addAll(result, items); return result; } }