Here you can find the source of union(Collection c1, Collection c2)
@SuppressWarnings({ "rawtypes", "unchecked" }) public static List union(Collection c1, Collection c2)
//package com.java2s; import java.util.ArrayList; import java.util.Collection; import java.util.List; public class Main { @SuppressWarnings({ "rawtypes", "unchecked" }) public static List union(Collection c1, Collection c2) { List collection = new ArrayList(); collection.addAll(c1);//www . ja v a 2s .c om collection.addAll(c2); return collection; } }