209210211212213214215216217218219
BooleanBag bag = (BooleanBag) obj; if (bag.size() != 1) { return false; } return this.occurrencesOf(this.element1) == bag.occurrencesOf(this.element1); } @Override public int hashCode() {
515516517518519520521522523524525
if (this.sizeDistinct() != bag.sizeDistinct()) { return false; } return this.falseCount == bag.occurrencesOf(false) && this.trueCount == bag.occurrencesOf(true); } @Override public int hashCode() {