static bool syncRemove(Collection c, A b) { if (c == null) false; synchronized(collectionMutex(c)) { ret c.remove(b); } } static B syncRemove(Map c, A key) { ret map == null ? null : map.remove(key); }