package o;

import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class SG implements Map, Serializable {
    public transient J10 l;
    public transient K10 m;
    public transient L10 n;

    @Override // java.util.Map
    /* renamed from: a, reason: merged with bridge method [inline-methods] */
    public final UG entrySet() {
        J10 j10 = this.l;
        if (j10 != null) {
            return j10;
        }
        M10 m10 = (M10) this;
        J10 j102 = new J10(m10, m10.p, m10.q);
        this.l = j102;
        return j102;
    }

    @Override // java.util.Map
    public final void clear() {
        throw new UnsupportedOperationException();
    }

    @Override // java.util.Map
    public final boolean containsKey(Object obj) {
        return get(obj) != null;
    }

    @Override // java.util.Map
    public final boolean containsValue(Object obj) {
        L10 l10 = this.n;
        if (l10 == null) {
            M10 m10 = (M10) this;
            L10 l102 = new L10(m10.p, 1, m10.q);
            this.n = l102;
            l10 = l102;
        }
        return l10.contains(obj);
    }

    @Override // java.util.Map
    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof Map) {
            return entrySet().equals(((Map) obj).entrySet());
        }
        return false;
    }

    @Override // java.util.Map
    public abstract Object get(Object obj);

    @Override // java.util.Map
    public final Object getOrDefault(Object obj, Object obj2) {
        Object obj3 = get(obj);
        return obj3 != null ? obj3 : obj2;
    }

    @Override // java.util.Map
    public final int hashCode() {
        Iterator it = entrySet().iterator();
        int i = 0;
        while (it.hasNext()) {
            Object next = it.next();
            i = ~(~(i + (next != null ? next.hashCode() : 0)));
        }
        return i;
    }

    @Override // java.util.Map
    public final boolean isEmpty() {
        return ((M10) this).size() == 0;
    }

    @Override // java.util.Map
    public final Set keySet() {
        K10 k10 = this.m;
        if (k10 != null) {
            return k10;
        }
        M10 m10 = (M10) this;
        K10 k102 = new K10(m10, new L10(m10.p, 0, m10.q));
        this.m = k102;
        return k102;
    }

    @Override // java.util.Map
    public final Object put(Object obj, Object obj2) {
        throw new UnsupportedOperationException();
    }

    @Override // java.util.Map
    public final void putAll(Map map) {
        throw new UnsupportedOperationException();
    }

    @Override // java.util.Map
    public final Object remove(Object obj) {
        throw new UnsupportedOperationException();
    }

    public final String toString() {
        int i = ((M10) this).q;
        F3.k(i, "size");
        StringBuilder sb = new StringBuilder((int) Math.min(i * 8, 1073741824L));
        sb.append('{');
        Sh0 it = ((J10) entrySet()).iterator();
        boolean z = true;
        while (true) {
            LG lg = (LG) it;
            if (!lg.hasNext()) {
                sb.append('}');
                return sb.toString();
            }
            Map.Entry entry = (Map.Entry) lg.next();
            if (!z) {
                sb.append(", ");
            }
            sb.append(entry.getKey());
            sb.append('=');
            sb.append(entry.getValue());
            z = false;
        }
    }

    @Override // java.util.Map
    public final Collection values() {
        L10 l10 = this.n;
        if (l10 != null) {
            return l10;
        }
        M10 m10 = (M10) this;
        L10 l102 = new L10(m10.p, 1, m10.q);
        this.n = l102;
        return l102;
    }

    public Object writeReplace() {
        return new RG(this);
    }
}
