package g.c;

import java.util.Collection;
import java.util.Map;
import java.util.Set;

/* JADX INFO: compiled from: ArrayMap.java */
/* JADX INFO: loaded from: classes.dex */
public class a<K, V> extends g<K, V> implements Map<K, V> {

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    f<K, V> f434j;

    /* JADX INFO: renamed from: g.c.a$a, reason: collision with other inner class name */
    /* JADX INFO: compiled from: ArrayMap.java */
    class C0019a extends f<K, V> {
        C0019a() {
        }

        @Override // g.c.f
        protected void a() {
            a.this.clear();
        }

        @Override // g.c.f
        protected Object b(int i2, int i3) {
            return a.this.d[(i2 << 1) + i3];
        }

        @Override // g.c.f
        protected Map<K, V> c() {
            return a.this;
        }

        @Override // g.c.f
        protected int d() {
            return a.this.e;
        }

        @Override // g.c.f
        protected int e(Object obj) {
            return a.this.g(obj);
        }

        @Override // g.c.f
        protected int f(Object obj) {
            return a.this.i(obj);
        }

        @Override // g.c.f
        protected void g(K k2, V v) {
            a.this.put(k2, v);
        }

        @Override // g.c.f
        protected void h(int i2) {
            a.this.k(i2);
        }

        @Override // g.c.f
        protected V i(int i2, V v) {
            return a.this.l(i2, v);
        }
    }

    public a() {
    }

    private f<K, V> n() {
        if (this.f434j == null) {
            this.f434j = new C0019a();
        }
        return this.f434j;
    }

    @Override // java.util.Map
    public Set<Map.Entry<K, V>> entrySet() {
        return n().l();
    }

    @Override // java.util.Map
    public Set<K> keySet() {
        return n().m();
    }

    public boolean o(Collection<?> collection) {
        return f.p(this, collection);
    }

    @Override // java.util.Map
    public void putAll(Map<? extends K, ? extends V> map) {
        d(this.e + 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 n().n();
    }

    public a(int i2) {
        super(i2);
    }
}
