Here you can find the source of removeAllFromSet(AbstractSet> collection, Collection> toRemove)
private static boolean removeAllFromSet(AbstractSet<?> collection, Collection<?> toRemove)
//package com.java2s; import java.util.AbstractSet; import java.util.Collection; public class Main { private static boolean removeAllFromSet(AbstractSet<?> collection, Collection<?> toRemove) { boolean result = false; for (Object o : toRemove) result |= collection.remove(o); return result; }//w w w. j a v a2 s . com }