static void removeAllBut(Set a, Collection b) { for (A x : b) a.remove(x); }