static bool containsAny(Collection a, Collection b) {
if (empty(a) || empty(b)) false;
Set set = asSet(b);
for (A x : a)
if (contains(set, x))
true;
false;
}
// iterates over b
static bool containsAny(Map a, Collection b) {
if (empty(a)) false;
if (b != null) for (A x : b)
if (a.containsKey(x))
true;
false;
}