List of utility methods to do List Contain
boolean | containsIgnoreCase(List Returns true if the passed list contains the passed String s, ignoring case. for (String string : list) { if (string.toLowerCase().equals(s.toLowerCase())) { return true; return false; |
boolean | containsIgnoreCase(List contains Ignore Case for (String current : list) { if (current.equalsIgnoreCase(soughtFor)) { return true; return false; |
boolean | containsIgnoreCase(String str, String... list) contains Ignore Case if (list != null && list.length != 0) { for (String s : Arrays.asList(list)) { if (s != null && s.equalsIgnoreCase(str)) { return true; return false; ... |
boolean | containsInAnyOrder(final List Compares the content of the two list, no matter how they are ordered if (test == null || control == null) { return false; if (test.size() != control.size()) { return false; final List<T> orderedControl = new LinkedList<T>(control); Collections.sort(orderedControl); ... |
boolean | containsIndex(int index, List> objects) Determines whether the specified index is not null in the specified list. if (objects.size() >= index) { for (int i = 0; i < objects.size(); i++) { if (i == index) { return true; return false; ... |
boolean | containsInEach(List Contains in each. for (String value : second) { if (!first.contains(value)) { return false; return true; |
Boolean | ContainsInList(String list, String value) Contains In List if (list == null) { return false; } else { return Arrays.asList(list.split(",\\s*")).contains(value); |
boolean | containsInOrder(List contains In Order int lastMatch = -1; for (int i = 0; i < b.size(); i++) { T find = b.get(i); boolean found = false; for (int k = lastMatch + 1; k < a.size(); k++) { if (a.get(k).equals(find)) { lastMatch = k; found = true; ... |
boolean | containsInstance(final List contains Instance return list.stream().anyMatch(e -> clazz.isInstance(e));
|
boolean | containsInstance(List> list, Object object) Returns true if the list contains the exact instance of the specified object. return indexOfInstance(list, object) > -1;
|