package com.google.common.collect; import com.google.common.base.Objects; import com.google.common.collect.Multiset; import com.google.common.collect.Multisets; import java.util.Collection; import java.util.Iterator; import java.util.Set; /* loaded from: classes2.dex */ public abstract class ForwardingMultiset extends ForwardingCollection implements Multiset { /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.common.collect.ForwardingCollection, com.google.common.collect.ForwardingObject public abstract Multiset delegate(); @Override // com.google.common.collect.Multiset public int count(Object obj) { return delegate().count(obj); } @Override // com.google.common.collect.Multiset public int add(E e, int i) { return delegate().add(e, i); } @Override // com.google.common.collect.Multiset public int remove(Object obj, int i) { return delegate().remove(obj, i); } public Set elementSet() { return delegate().elementSet(); } public Set> entrySet() { return delegate().entrySet(); } @Override // java.util.Collection, com.google.common.collect.Multiset public boolean equals(Object obj) { return obj == this || delegate().equals(obj); } @Override // java.util.Collection, com.google.common.collect.Multiset public int hashCode() { return delegate().hashCode(); } @Override // com.google.common.collect.Multiset public int setCount(E e, int i) { return delegate().setCount(e, i); } @Override // com.google.common.collect.Multiset public boolean setCount(E e, int i, int i2) { return delegate().setCount(e, i, i2); } @Override // com.google.common.collect.ForwardingCollection protected boolean standardContains(Object obj) { return count(obj) > 0; } @Override // com.google.common.collect.ForwardingCollection protected void standardClear() { Iterators.clear(entrySet().iterator()); } protected int standardCount(Object obj) { for (Multiset.Entry entry : entrySet()) { if (Objects.equal(entry.getElement(), obj)) { return entry.getCount(); } } return 0; } protected boolean standardAdd(E e) { add(e, 1); return true; } /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.common.collect.ForwardingCollection public boolean standardAddAll(Collection collection) { return Multisets.addAllImpl(this, collection); } @Override // com.google.common.collect.ForwardingCollection protected boolean standardRemove(Object obj) { return remove(obj, 1) > 0; } @Override // com.google.common.collect.ForwardingCollection protected boolean standardRemoveAll(Collection collection) { return Multisets.removeAllImpl(this, collection); } /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.common.collect.ForwardingCollection public boolean standardRetainAll(Collection collection) { return Multisets.retainAllImpl(this, collection); } protected int standardSetCount(E e, int i) { return Multisets.setCountImpl(this, e, i); } protected boolean standardSetCount(E e, int i, int i2) { return Multisets.setCountImpl(this, e, i, i2); } /* loaded from: classes2.dex */ protected class StandardElementSet extends Multisets.ElementSet { final ForwardingMultiset this$0; public StandardElementSet(ForwardingMultiset forwardingMultiset) { this.this$0 = forwardingMultiset; } @Override // com.google.common.collect.Multisets.ElementSet, java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set public Iterator iterator() { return Multisets.elementIterator(multiset().entrySet().iterator()); } @Override // com.google.common.collect.Multisets.ElementSet Multiset multiset() { return this.this$0; } } protected Iterator standardIterator() { return Multisets.iteratorImpl(this); } protected int standardSize() { return Multisets.linearTimeSizeImpl(this); } protected boolean standardEquals(Object obj) { return Multisets.equalsImpl(this, obj); } protected int standardHashCode() { return entrySet().hashCode(); } /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.common.collect.ForwardingCollection public String standardToString() { return entrySet().toString(); } }