152 lines
3.8 KiB
Java
152 lines
3.8 KiB
Java
package com.google.common.collect;
|
|
|
|
import com.google.common.base.Objects;
|
|
import com.google.common.collect.Maps;
|
|
import java.util.Collection;
|
|
import java.util.Iterator;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public abstract class ForwardingMap<K, V> extends ForwardingObject implements Map<K, V> {
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
@Override // com.google.common.collect.ForwardingObject
|
|
public abstract Map<K, V> delegate();
|
|
|
|
@Override // java.util.Map
|
|
public int size() {
|
|
return delegate().size();
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public boolean isEmpty() {
|
|
return delegate().isEmpty();
|
|
}
|
|
|
|
public V remove(Object obj) {
|
|
return delegate().remove(obj);
|
|
}
|
|
|
|
public void clear() {
|
|
delegate().clear();
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public boolean containsKey(Object obj) {
|
|
return delegate().containsKey(obj);
|
|
}
|
|
|
|
public boolean containsValue(Object obj) {
|
|
return delegate().containsValue(obj);
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public V get(Object obj) {
|
|
return delegate().get(obj);
|
|
}
|
|
|
|
public V put(K k, V v) {
|
|
return delegate().put(k, v);
|
|
}
|
|
|
|
public void putAll(Map<? extends K, ? extends V> map) {
|
|
delegate().putAll(map);
|
|
}
|
|
|
|
public Set<K> keySet() {
|
|
return delegate().keySet();
|
|
}
|
|
|
|
public Collection<V> values() {
|
|
return delegate().values();
|
|
}
|
|
|
|
public Set<Map.Entry<K, V>> entrySet() {
|
|
return delegate().entrySet();
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public boolean equals(Object obj) {
|
|
return obj == this || delegate().equals(obj);
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public int hashCode() {
|
|
return delegate().hashCode();
|
|
}
|
|
|
|
protected void standardPutAll(Map<? extends K, ? extends V> map) {
|
|
Maps.putAllImpl(this, map);
|
|
}
|
|
|
|
protected V standardRemove(Object obj) {
|
|
Iterator<Map.Entry<K, V>> it = entrySet().iterator();
|
|
while (it.hasNext()) {
|
|
Map.Entry<K, V> next = it.next();
|
|
if (Objects.equal(next.getKey(), obj)) {
|
|
V value = next.getValue();
|
|
it.remove();
|
|
return value;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
protected void standardClear() {
|
|
Iterators.clear(entrySet().iterator());
|
|
}
|
|
|
|
/* loaded from: classes2.dex */
|
|
protected class StandardKeySet extends Maps.KeySet<K, V> {
|
|
public StandardKeySet(ForwardingMap forwardingMap) {
|
|
super(forwardingMap);
|
|
}
|
|
}
|
|
|
|
protected boolean standardContainsKey(Object obj) {
|
|
return Maps.containsKeyImpl(this, obj);
|
|
}
|
|
|
|
/* loaded from: classes2.dex */
|
|
protected class StandardValues extends Maps.Values<K, V> {
|
|
public StandardValues(ForwardingMap forwardingMap) {
|
|
super(forwardingMap);
|
|
}
|
|
}
|
|
|
|
protected boolean standardContainsValue(Object obj) {
|
|
return Maps.containsValueImpl(this, obj);
|
|
}
|
|
|
|
/* loaded from: classes2.dex */
|
|
protected abstract class StandardEntrySet extends Maps.EntrySet<K, V> {
|
|
final ForwardingMap this$0;
|
|
|
|
public StandardEntrySet(ForwardingMap forwardingMap) {
|
|
this.this$0 = forwardingMap;
|
|
}
|
|
|
|
@Override // com.google.common.collect.Maps.EntrySet
|
|
Map<K, V> map() {
|
|
return this.this$0;
|
|
}
|
|
}
|
|
|
|
protected boolean standardIsEmpty() {
|
|
return !entrySet().iterator().hasNext();
|
|
}
|
|
|
|
protected boolean standardEquals(Object obj) {
|
|
return Maps.equalsImpl(this, obj);
|
|
}
|
|
|
|
protected int standardHashCode() {
|
|
return Sets.hashCodeImpl(entrySet());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public String standardToString() {
|
|
return Maps.toStringImpl(this);
|
|
}
|
|
}
|