List of utility methods to do Collection Equal
int | isEqualBasicCol(Collection col1, Collection col2) is Equal Basic Col if (col1 == col2) { return B_TRUE; } else if (col1 == null || col2 == null) { if (col1 == null) { if (col2.size() == 0) return B_TRUE; else return B_FALSE; ... |
boolean | isEqualCollection(final Collection a, final Collection b) Returns true iff the given Collection s contain exactly the same elements with exactly the same cardinality. if (a.size() != b.size()) { return false; } else { Map mapa = getCardinalityMap(a); Map mapb = getCardinalityMap(b); if (mapa.size() != mapb.size()) { return false; } else { ... |
boolean | isEqualCollection(final Collection a, final Collection b) Returns true iff the given Collection s contain exactly the same elements with exactly the same cardinality. if (a.size() != b.size()) { return false; } else { Map mapa = getCardinalityMap(a); Map mapb = getCardinalityMap(b); if (mapa.size() != mapb.size()) { return false; } else { ... |
boolean | isEqualDeep(Collection a, Collection b) Asks if two collections are equal by comparing them deeply. if (a == null && b == null) return true; if (a == null) return false; if (b == null) return false; for (Object o : a) { if (!b.contains(a)) ... |
boolean | isEquals(Collection is Equals if (set1.size() == set2.size()) { return isSubset(set1, set2); return false; |
boolean | isEqualsSize(Collection res, Collection des) is Equals Size if (res.size() == des.size()) { return true; } else { return false; |
boolean | orderedEqual(Collection ordered Equal if (c1.size() != c2.size()) return false; Iterator<T> i1 = c1.iterator(), i2 = c2.iterator(); while (i1.hasNext() && i2.hasNext()) { T t1 = i1.next(), t2 = i2.next(); if ((t1 == null) != (t2 == null)) return false; if (t1 != null) { ... |