|
|
|
|
@ -181,15 +181,7 @@ public abstract class CollectionUtils {
@@ -181,15 +181,7 @@ public abstract class CollectionUtils {
|
|
|
|
|
* @return whether any of the candidates has been found |
|
|
|
|
*/ |
|
|
|
|
public static boolean containsAny(Collection<?> source, Collection<?> candidates) { |
|
|
|
|
if (isEmpty(source) || isEmpty(candidates)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
for (Object candidate : candidates) { |
|
|
|
|
if (source.contains(candidate)) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
return findFirstMatch(source, candidates) != null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|