static bool setAddAllQuick(Collection a, Collection b) { Set index = a instanceof Set ? (Set) a : new HashSet(a); bool change = false; for (A x : unnull(b)) if (!index.contains(x)) { a.add(x); if (index != a) index.add(x); change = true; } ret change; }