List of utility methods to do Collection Contain
boolean | containsIgnoreCase(Collection Utility method which does a case-insensitive check on the given Collection of Strings for the passed testString, returning true if the Collection contains the passed string if (collection == null) { return false; for (String s : collection) { if (s.equalsIgnoreCase(testString)) { return true; return false; |
boolean | containsIgnoreCase(Collection Checks if the given collection of strings contains the provided string ignoring case. if (value == null) { return false; for (String string : collection) { if (string.equalsIgnoreCase(value)) { return true; return false; |
boolean | containsIgnoreCase(Collection Used to see if a Collection of strings contains a string, ignoring case. Iterator<String> it = l.iterator(); while (it.hasNext()) { if (it.next().equalsIgnoreCase(s)) { return true; return false; |
boolean | containsIgnoreCase(String searchedWord, Collection contains Ignore Case for (String name : words) if (name.equalsIgnoreCase(searchedWord)) return true; return false; |
boolean | containsIgnoreCase4Collections(Collection contains Ignore Case Collections if (c == null || s == null) { return false; for (String string : c) { if (string.equalsIgnoreCase(s)) { return true; return false; |
boolean | containsInstance(Collection collection, Object element) contains Instance if (collection != null) { Iterator i$ = collection.iterator(); while (i$.hasNext()) { Object candidate = i$.next(); if (candidate == element) { return true; return false; |
boolean | containsInstance(Collection collection, Object element) Check whether the given Collection contains the given element instance. if (collection != null) { for (Object candidate : collection) { if (candidate == element) { return true; return false; ... |
boolean | containsInstanceOf(Collection collection, Class c) Returns true if the collections contains any object that is an instance of the specified class, and false otherwise.
Iterator iterator = collection.iterator(); while (iterator.hasNext()) { Object obj = iterator.next(); if (obj != null && obj.getClass().equals(c)) { return true; return false; ... |
boolean | containsKey(Collection keys, String key) Answers if normalized key is contained in the set of keys Iterator ksit = keys.iterator(); while (ksit.hasNext()) { String key1 = (String) ksit.next(); if (key1.replaceAll(" ", "").equalsIgnoreCase(key.replaceAll(" ", ""))) { return (true); return (false); ... |
boolean | containsNo(Collection Checks if the given basic list contains any element of the given value list. for (T v : valueList) { if (baseList.contains(v)) { return false; return true; |