List of utility methods to do List Contain
boolean | contains(List aList, Object anObj) Returns whether list contains given object (accepts null list). return aList != null && aList.contains(anObj);
|
boolean | contains(List list, Object obj) Checks if the given list contains a specific object value by comparing the string version. for (Object entry : list) { if (entry.toString().equals(obj.toString())) return true; return false; |
boolean | contains(List lsttor, Object val) contains for (int i = 0; i < lsttor.size(); i++) if (lsttor.get(i).equals(val)) return true; return false; |
boolean | contains(List> list, Object element, int begin, int end) contains return indexOf(list, element, begin, end) != -1;
|
boolean | contains(List> objects, Object object) contains boolean contains = objects.contains(object); return contains; |
boolean | contains(List listOfArrays, A[] array) Checks if the given list of arrays contains an array that is equal to array by the definition of Arrays.equal(..) (both arrays must have the same number of elements, and every pair of elements must be equal according to Object.equals).
for (A[] curArray : listOfArrays) { if (Arrays.equals(curArray, array)) return true; return false; |
boolean | contains(List contains for (int[] arr2 : list) { if (arr.length != arr2.length) continue; for (int i = 0; i < arr2.length; i++) if (arr2[i] != arr[i]) continue; return true; return false; |
boolean | contains(List
contains for (List<String> cur : listOfLists) { if (isSame(list, cur)) { return true; return false; |
boolean | contains(List contains if (list == null || list.isEmpty() || isNullOrEmpty(str)) return false; if (bcaseSensitive) { return list.contains(str); for (String s : list) { if (s.equalsIgnoreCase(str)) return true; ... |
boolean | contains(List This method checks if the list contains the given string (case sensitive). if (isNotEmpty(list)) { for (String item : list) { if ((item != null && string != null && item.compareTo(string) == 0) || (item == null && string == null)) { return true; return false; |