Java tutorial
//package com.java2s; import java.util.*; public class Main { public static <T> Collection<T> minus(Collection<T> col1, Collection<T> col2) { List<T> list = clone(col1); list.removeAll(col2); return list; } public static <T> List<T> clone(Collection<T> col) { List<T> destCol = new ArrayList<T>(); for (T o : col) { destCol.add(o); } return destCol; } }