Initial commit
This commit is contained in:
126
sources/com/google/common/collect/ForwardingMap.java
Normal file
126
sources/com/google/common/collect/ForwardingMap.java
Normal file
@@ -0,0 +1,126 @@
|
||||
package com.google.common.collect;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class ForwardingMap<K, V> extends ForwardingObject implements Map<K, V> {
|
||||
protected ForwardingMap() {
|
||||
}
|
||||
|
||||
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 // com.google.common.collect.ForwardingObject
|
||||
protected abstract /* bridge */ /* synthetic */ Object delegate();
|
||||
|
||||
@Override // com.google.common.collect.ForwardingObject
|
||||
protected abstract Map<K, V> delegate();
|
||||
|
||||
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 V get(Object obj) {
|
||||
return delegate().get(obj);
|
||||
}
|
||||
|
||||
@Override // java.util.Map
|
||||
public int hashCode() {
|
||||
return delegate().hashCode();
|
||||
}
|
||||
|
||||
@Override // java.util.Map
|
||||
public boolean isEmpty() {
|
||||
return delegate().isEmpty();
|
||||
}
|
||||
|
||||
public Set<K> keySet() {
|
||||
return delegate().keySet();
|
||||
}
|
||||
|
||||
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 V remove(Object obj) {
|
||||
return delegate().remove(obj);
|
||||
}
|
||||
|
||||
@Override // java.util.Map
|
||||
public int size() {
|
||||
return delegate().size();
|
||||
}
|
||||
|
||||
protected void standardClear() {
|
||||
Iterators.b(entrySet().iterator());
|
||||
}
|
||||
|
||||
protected boolean standardContainsKey(Object obj) {
|
||||
return Maps.a((Map<?, ?>) this, obj);
|
||||
}
|
||||
|
||||
protected boolean standardContainsValue(Object obj) {
|
||||
return Maps.b(this, obj);
|
||||
}
|
||||
|
||||
protected boolean standardEquals(Object obj) {
|
||||
return Maps.c(this, obj);
|
||||
}
|
||||
|
||||
protected int standardHashCode() {
|
||||
return Sets.a(entrySet());
|
||||
}
|
||||
|
||||
protected boolean standardIsEmpty() {
|
||||
return !entrySet().iterator().hasNext();
|
||||
}
|
||||
|
||||
protected void standardPutAll(Map<? extends K, ? extends V> map) {
|
||||
Maps.a((Map) this, (Map) 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.a(next.getKey(), obj)) {
|
||||
V value = next.getValue();
|
||||
it.remove();
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected String standardToString() {
|
||||
return Maps.a(this);
|
||||
}
|
||||
|
||||
public Collection<V> values() {
|
||||
return delegate().values();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user