static bool syncAdd(Collection c, A b) { if (c == null) false; synchronized(collectionMutex(c)) { ret c.add(b); } } static void syncAdd(L l, int idx, A b) { if (l != null) synchronized(collectionMutex(l)) { l.add(idx, b); } }