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