Java tutorial
//package com.java2s; import java.util.List; public class Main { public static <T> void removeAll(List<? extends T> removeFrom, List<? super T> c2) { for (Object o : c2) { for (int i = 0; i < removeFrom.size(); i++) { if (o.equals(removeFrom.get(i))) { removeFrom.remove(i); } } } } }