Skip to content

Commit

Permalink
Simplify method CollectionUtils#isEqualCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
StudentGu committed Aug 6, 2024
1 parent a215dfe commit 7ecba33
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1206,15 +1206,7 @@ public static boolean isEqualCollection(final Collection<?> a, final Collection<
return false;
}
final CardinalityHelper<Object> helper = new CardinalityHelper<>(a, b);
if (helper.cardinalityA.size() != helper.cardinalityB.size()) {
return false;
}
for (final Object obj : helper.cardinalityA.keySet()) {
if (helper.freqA(obj) != helper.freqB(obj)) {
return false;
}
}
return true;
return helper.cardinalityA.equals(helper.cardinalityB);
}

/**
Expand Down

0 comments on commit 7ecba33

Please sign in to comment.