Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static <T> Collection<T> merge(Collection<T> c1, Collection<T> c2) { for (T e : c2) { if (!c1.contains(e)) { c1.add(e); } } return c1; } }