List of utility methods to do Collection Contain
boolean | containsAny(final Collection coll1, final Collection coll2) Returns true iff at least one element is in both collections.
if (coll1.size() < coll2.size()) { for (Iterator it = coll1.iterator(); it.hasNext();) { if (coll2.contains(it.next())) { return true; } else { for (Iterator it = coll2.iterator(); it.hasNext();) { ... |
boolean | containsAny(final Collection> collection, final Object... items) contains Any if (collection != null) { for (final Object item : items) { final boolean b = collection.contains(item); if (b) { return true; return false; |
boolean | containsAny(final Collection> collection1, final Collection> collection2) contains Any for (final Object value : collection1) { if (collection2.contains(value)) { return true; return false; |
boolean | containsAny(final Collection a, final Collection b) contains Any for (Iterator<B> it = b.iterator(); it.hasNext();) if (a.contains(it.next())) return true; return false; |
boolean | containsAnyIgnoreCase(String string, Collection Indicates whether the given string contains any of the given search strings. if (string == null || searchStrings == null) { return false; for (String searchString : searchStrings) { if (string.trim().toLowerCase().contains(searchString.trim().toLowerCase())) { return true; return false; |
boolean | containsAnyNull(Collection> source) contains Any Null if (source == null || source.isEmpty()) { return true; for (Object o : source) { if (o == null) { return true; return false; |
boolean | containsAnyOf(String s, Collection values) contains Any Of if (s == null) return false; for (Iterator i$ = values.iterator(); i$.hasNext();) { String value = (String) i$.next(); if (s.contains(value)) return true; return false; ... |
boolean | containsAnyVariables(Collection contains Any Variables for (String propertyValue : propertyValues) { if (propertyValue.contains(VARIABLE_START)) { return true; return false; |
boolean | containsAssignableClass(Collection contains Assignable Class for (Class<?> cls : clses) { if (cls.isAssignableFrom(clazz)) { return true; return false; |
boolean | containsAtLeastOne(Collection origin, Collection elements) Return true if origin collection contains at least one element from another collection boolean result = false; for (Object element : elements) { if (origin.contains(element)) { result = true; break; return result; ... |