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() {
254255256257258259260261262263264
ByteBag bag = (ByteBag) obj; if (bag.size() != 1) { return false; } return this.occurrencesOf(this.element1) == bag.occurrencesOf(this.element1); } @Override public int hashCode() {
493494495496497498499500501502503
return this.items.keysView().allSatisfy(new BytePredicate() { public boolean accept(byte key) { return ByteHashBag.this.occurrencesOf(key) == bag.occurrencesOf(key); } }); } @Override
return this.items.keysView().allSatisfy(new CharPredicate() { public boolean accept(char key) { return CharHashBag.this.occurrencesOf(key) == bag.occurrencesOf(key); } }); } @Override
CharBag bag = (CharBag) obj; if (bag.size() != 1) { return false; } return this.occurrencesOf(this.element1) == bag.occurrencesOf(this.element1); } @Override public int hashCode() {
DoubleBag bag = (DoubleBag) obj; if (bag.size() != 1) { return false; } return this.occurrencesOf(this.element1) == bag.occurrencesOf(this.element1); } @Override public int hashCode() {
return this.items.keysView().allSatisfy(new DoublePredicate() { public boolean accept(double key) { return DoubleHashBag.this.occurrencesOf(key) == bag.occurrencesOf(key); } }); } @Override
FloatBag bag = (FloatBag) obj; if (bag.size() != 1) { return false; } return this.occurrencesOf(this.element1) == bag.occurrencesOf(this.element1); } @Override public int hashCode() {