Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static void addAllWithoutDuplicates(Collection collection, Collection addTo) { for (Object obj : addTo) { if (!collection.contains(obj)) { collection.add(obj); } } } }