static boolean matchAny(Collection patterns, S s, Matches m) { for (S pattern : patterns) if (match(pattern, s, m)) ret true; ret false; } static boolean matchAny(Collection patterns, S s) { ret matchAny(patterns, s, null); } // 2nd version static bool matchAny(S pat, L l, Matches m) { for (S s : l) if (match(pat, s, m)) true; false; }