// syncs on a static bool syncRemoveAllExcept(Set a, Collection b) { if (a == null) false; synchronized(collectionMutex(a)) { ret removeAllBut(a, b); } } static bool syncRemoveAllExcept(Map a, Collection b) { if (a == null) false; synchronized(collectionMutex(a)) { ret removeAllBut(a, b); } }