Java tutorial
//package com.java2s; import java.util.Collection; import java.util.LinkedList; public class Main { public static <T> Collection<T> not(Collection<T> all, Collection<T> not) { Collection<T> remain = new LinkedList<T>(all); remain.removeAll(not); return remain; } }