List of utility methods to do List Contain
boolean | contains(List contains return false;
|
boolean | contains(List Returns true if container contains all elements from list . Iterator<T> listIterator = list.iterator(); Iterator<T> containerIterator = container.iterator(); T listElement = listIterator.next(); T containerElement = containerIterator.next(); while (true) { int r = comparator.compare(containerElement, listElement); if (r == 0) { if (!listIterator.hasNext()) { ... |
String | contains(String str, List contains for (String s : list) { if (str.indexOf(s) != -1) { return s; return null; |
boolean | contains1(final String id, final List This method checks if the given string is present in the list of String (s). if ((id != null) && (idList != null)) { for (final String idFromList : idList) { if (idFromList.equals(id)) { return true; return false; ... |
boolean | containsAFloatingPointNumber(List contains A Floating Point Number for (Number value : values) { if (isAFloatingPointNumber(value)) { return true; return false; |
boolean | containsAll(List contains All if (isEmpty(list)) return false; if (items == null || items.length < list.size()) return false; for (T item : items) if (!list.contains(item)) return false; return true; ... |
boolean | containsAllIgnoreCase(List contains All Ignore Case for (String rightString : right) { if (!containsIgnoreCase(left, rightString)) { return false; return true; |
boolean | containsAny(final String projectName, final List contains Any for (final String indicator : indicators) { if (projectName.toLowerCase().startsWith(indicator.toLowerCase())) { return true; return false; |
boolean | containsAny(List> value, Object[] values) contains Any if (value != null && values != null) { for (Object v : values) { if (value.contains(v)) { return true; return false; ... |
boolean | containsAny(Set theList, Set toSearch) Checks to see if any elements of one set are present in another. if (toSearch.isEmpty()) return false; else { Iterator iter = theList.iterator(); while (iter.hasNext()) { Object obj = iter.next(); if (toSearch.contains(obj)) return true; ... |