Android Utililty Methods Collection Equal

List of utility methods to do Collection Equal

Description

The list of methods to do Collection Equal are organized into topic(s).

Method

booleanisEqualCollection(final Collection a, final Collection b)
Returns true if the given java.util.Collections contain exactly the same elements with exactly the same cardinalities.
if (a.size() != b.size()) {
    return false;
} else {
    Map<?, ?> mapA = getCardinalityMap(a);
    Map<?, ?> mapB = getCardinalityMap(b);
    if (mapA.size() != mapB.size()) {
        return false;
    } else {
...