List of utility methods to do Collection Contain
boolean | containsAny(Collection Check whether c2 contains any element in c1 .
for (final E elem : c1) { if (c2.contains(elem)) { return true; return false; |
boolean | containsAny(Collection contains Any if (set == null) return false; for (Integer elem : elements) if (set.contains(elem)) return true; return false; |
boolean | containsAny(Collection Returns true if the passed collection contains any String in the passed String[] if (c != null) { for (String s : toCheck) { if (c.contains(s)) { return true; return false; ... |
boolean | containsAny(Collection contains Any for (String str : strs) { if (containsAny(str, searchTerms)) { return true; return false; |
boolean | containsAny(Collection contains Any if (collection == null || collection.isEmpty() || query == null || query.isEmpty()) return false; for (T val : query) { if (collection.contains(val)) return true; return false; |
boolean | containsAny(Collection if any item in toCheck is present in collection for (T c : toCheck) { if (collection.contains(c)) return true; return false; |
boolean | containsAny(Collection contains Any if (list != null) { for (T o : values) { if (list.contains(o)) { return true; return false; ... |
boolean | containsAny(Collection contains Any for (T elem : containsAny) { if (src.contains(elem)) { return true; return false; |
boolean | containsAny(Collection contains Any for (V firstCollectionValue : firstCollection) { for (V secondCollectionValue : secondCollection) { if (firstCollectionValue != null && firstCollectionValue.equals(secondCollectionValue)) { return true; return false; ... |
boolean | containsAny(final Collection a, final Collection b) Returns true iff some element of a is also an element of b (or, equivalently, if some element of b is also an element of a).
for (Iterator iter = a.iterator(); iter.hasNext();) { if (b.contains(iter.next())) { return true; return false; |