101 lines
2.8 KiB
Java
101 lines
2.8 KiB
Java
package androidx.collection;
|
|
|
|
import java.util.Collection;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ArrayMap<K, V> extends SimpleArrayMap<K, V> implements Map<K, V> {
|
|
MapCollections<K, V> h;
|
|
|
|
public ArrayMap() {
|
|
}
|
|
|
|
private MapCollections<K, V> b() {
|
|
if (this.h == null) {
|
|
this.h = new MapCollections<K, V>() { // from class: androidx.collection.ArrayMap.1
|
|
@Override // androidx.collection.MapCollections
|
|
protected Object a(int i, int i2) {
|
|
return ArrayMap.this.b[(i << 1) + i2];
|
|
}
|
|
|
|
@Override // androidx.collection.MapCollections
|
|
protected int b(Object obj) {
|
|
return ArrayMap.this.b(obj);
|
|
}
|
|
|
|
@Override // androidx.collection.MapCollections
|
|
protected int c() {
|
|
return ArrayMap.this.c;
|
|
}
|
|
|
|
@Override // androidx.collection.MapCollections
|
|
protected int a(Object obj) {
|
|
return ArrayMap.this.a(obj);
|
|
}
|
|
|
|
@Override // androidx.collection.MapCollections
|
|
protected Map<K, V> b() {
|
|
return ArrayMap.this;
|
|
}
|
|
|
|
@Override // androidx.collection.MapCollections
|
|
protected void a(K k, V v) {
|
|
ArrayMap.this.put(k, v);
|
|
}
|
|
|
|
@Override // androidx.collection.MapCollections
|
|
protected V a(int i, V v) {
|
|
return ArrayMap.this.a(i, (int) v);
|
|
}
|
|
|
|
@Override // androidx.collection.MapCollections
|
|
protected void a(int i) {
|
|
ArrayMap.this.c(i);
|
|
}
|
|
|
|
@Override // androidx.collection.MapCollections
|
|
protected void a() {
|
|
ArrayMap.this.clear();
|
|
}
|
|
};
|
|
}
|
|
return this.h;
|
|
}
|
|
|
|
public boolean a(Collection<?> collection) {
|
|
return MapCollections.c(this, collection);
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public Set<Map.Entry<K, V>> entrySet() {
|
|
return b().d();
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public Set<K> keySet() {
|
|
return b().e();
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public void putAll(Map<? extends K, ? extends V> map) {
|
|
a(this.c + map.size());
|
|
for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {
|
|
put(entry.getKey(), entry.getValue());
|
|
}
|
|
}
|
|
|
|
@Override // java.util.Map
|
|
public Collection<V> values() {
|
|
return b().f();
|
|
}
|
|
|
|
public ArrayMap(int i) {
|
|
super(i);
|
|
}
|
|
|
|
public ArrayMap(SimpleArrayMap simpleArrayMap) {
|
|
super(simpleArrayMap);
|
|
}
|
|
}
|