Here you can find the source of removeAll(Collection source, Set remove)
public static void removeAll(Collection source, Set remove)
//package com.java2s; //License from project: Artistic License import java.util.*; public class Main { public static void removeAll(Collection source, Set remove) { Iterator i = remove.iterator(); while (i.hasNext()) { source.remove(i.next());//from ww w . j a va 2 s. co m } } }