package n;

import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;

/* JADX INFO: renamed from: n.c, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2576c implements Iterator, Map.Entry {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f21408a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f21409b = -1;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f21410c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ C2578e f21411d;

    public C2576c(C2578e c2578e) {
        this.f21411d = c2578e;
        this.f21408a = c2578e.f21416c - 1;
    }

    @Override // java.util.Map.Entry
    public final boolean equals(Object obj) {
        if (!this.f21410c) {
            throw new IllegalStateException("This container does not support retaining Map.Entry objects");
        }
        if (!(obj instanceof Map.Entry)) {
            return false;
        }
        Map.Entry entry = (Map.Entry) obj;
        Object key = entry.getKey();
        int i6 = this.f21409b;
        C2578e c2578e = this.f21411d;
        return kotlin.jvm.internal.o.c(key, c2578e.g(i6)) && kotlin.jvm.internal.o.c(entry.getValue(), c2578e.j(this.f21409b));
    }

    @Override // java.util.Map.Entry
    public final Object getKey() {
        if (this.f21410c) {
            return this.f21411d.g(this.f21409b);
        }
        throw new IllegalStateException("This container does not support retaining Map.Entry objects");
    }

    @Override // java.util.Map.Entry
    public final Object getValue() {
        if (this.f21410c) {
            return this.f21411d.j(this.f21409b);
        }
        throw new IllegalStateException("This container does not support retaining Map.Entry objects");
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        return this.f21409b < this.f21408a;
    }

    @Override // java.util.Map.Entry
    public final int hashCode() {
        if (!this.f21410c) {
            throw new IllegalStateException("This container does not support retaining Map.Entry objects");
        }
        int i6 = this.f21409b;
        C2578e c2578e = this.f21411d;
        Object objG = c2578e.g(i6);
        Object objJ = c2578e.j(this.f21409b);
        return (objG == null ? 0 : objG.hashCode()) ^ (objJ != null ? objJ.hashCode() : 0);
    }

    @Override // java.util.Iterator
    public final Object next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        this.f21409b++;
        this.f21410c = true;
        return this;
    }

    @Override // java.util.Iterator
    public final void remove() {
        if (!this.f21410c) {
            throw new IllegalStateException();
        }
        this.f21411d.h(this.f21409b);
        this.f21409b--;
        this.f21408a--;
        this.f21410c = false;
    }

    @Override // java.util.Map.Entry
    public final Object setValue(Object obj) {
        if (this.f21410c) {
            return this.f21411d.i(this.f21409b, obj);
        }
        throw new IllegalStateException("This container does not support retaining Map.Entry objects");
    }

    public final String toString() {
        return getKey() + "=" + getValue();
    }
}
