List of utility methods to do List Contain
void | addAllIfNotContained(List dst, Collection src) add All If Not Contained for (Object object : src) {
addIfNotContained(dst, object);
|
void | addIfNotContained(List list, Object object) add If Not Contained if (!list.contains(object)) {
list.add(object);
|
boolean | contains(final List contains for (final String entry : list) if (entry.toLowerCase().contains(str.toLowerCase())) return true; return false; |
boolean | contains(final List contains boolean found = false; for (final String element : requested) { if (!claimed.contains(element)) { found = false; break; found = true; return found; |
boolean | contains(final List Checks whether the given value is contained within the list (check by value or reference). for (final T elem : list) { if (elem == value || value != null && value.equals(elem)) { return true; return false; |
boolean | contains(final String text, final List Returns whether text contains any of the tokens from the specified list or not. for (final String token : tokens) { if (text.contains(token)) { return true; return false; |
boolean | contains(final String[] list, final String value) contains HashSet<String> set = new HashSet<String>(Arrays.asList(list)); return set.contains(value); |
int | contains(int[] list, int x) contains int pos = -1; if (list.length > 10) pos = Arrays.binarySearch(list, x); else for (int i = 0; i < list.length; i++) if (list[i] == x) pos = i; return pos >= 0 ? pos : -1; ... |
boolean | contains(int[] match, List Returns a flag indicating whether the container list contains an array which matches the specified match array. int len = container.size(); for (int i = 0; i < len; i++) { if (Arrays.equals(match, container.get(i))) { return true; return false; |
boolean | contains(int[] subject, int[][] list) contains for (int[] row : list) { if (Arrays.equals(subject, row)) { return true; return false; |