List of utility methods to do List Equal
boolean | equals(List equals if (l1 == null || l2 == null) { return false; if (l1.size() != l2.size()) { return false; for (int i = 0; i < l1.size(); i++) { if (ignoreCase) { ... |
boolean | equals(List equals return false;
|
boolean | equals(List equals if (lhs == rhs) return true; if ((lhs == null) != (rhs == null)) return false; if (lhs.size() != rhs.size()) return false; Iterator<String[]> li = lhs.iterator(); Iterator<String[]> ri = rhs.iterator(); ... |
boolean | equals(List Compare two lists using the comparator for all comparisons (not using the equals() operator) final int lhsSize = lhs.size(); if (lhsSize != rhs.size()) { return false; Collections.sort(lhs, comparator); Collections.sort(rhs, comparator); for (int i = 0; i < lhsSize; ++i) { if (comparator.compare(lhs.get(i), rhs.get(i)) != 0) { ... |
boolean | equals(List equals if (list1 == null && list2 == null) { return true; if (list1 == null || list2 == null) { return false; for (int i = 0; i < list1.size(); i++) { if (!list1.get(i).equals(list2.get(i))) { ... |
boolean | equalsAny(String toMatch, List equals Any return matchesAny != null && matchesAny.contains(toMatch);
|
boolean | equalsBasedOnEntryIdentity(final List equals Based On Entry Identity if (a == b) { return true; if (a == null || b == null) { return false; final int aSize = a.size(); final int bSize = b.size(); ... |
boolean | equalShallow(List extends T> list0, List extends T> list1) Returns whether two lists are equal to each other using shallow comparisons. if (list0.size() != list1.size()) { return false; for (int i = 0; i < list0.size(); i++) { if (list0.get(i) != list1.get(i)) { return false; return true; |
boolean | isEqual(Collection Return true if same objects exist in listA and listB if (listA.size() != listB.size()) { return false; if (listA.size() != setIntersection(listA, listB).size()) { return false; return true; |
boolean | isEqual(List extends Object> list1, List extends Object> list2) Checks if the given list are equals, this means that they contain the same elements. if (list1.size() != list2.size()) { return false; for (Iterator<? extends Object> it = list1.iterator(); it.hasNext();) { Object obj = it.next(); if (!list2.contains(obj)) { return false; return true; |