package q;

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

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

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

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

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

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final /* synthetic */ e f16174t;

    public C1442c(e eVar) {
        this.f16174t = eVar;
        this.f16171q = eVar.f16190s - 1;
    }

    @Override // java.util.Map.Entry
    public final boolean equals(Object obj) {
        if (!this.f16173s) {
            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 i = this.f16172r;
        e eVar = this.f16174t;
        return P6.g.a(key, eVar.e(i)) && P6.g.a(entry.getValue(), eVar.h(this.f16172r));
    }

    @Override // java.util.Map.Entry
    public final Object getKey() {
        if (this.f16173s) {
            return this.f16174t.e(this.f16172r);
        }
        throw new IllegalStateException("This container does not support retaining Map.Entry objects");
    }

    @Override // java.util.Map.Entry
    public final Object getValue() {
        if (this.f16173s) {
            return this.f16174t.h(this.f16172r);
        }
        throw new IllegalStateException("This container does not support retaining Map.Entry objects");
    }

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

    @Override // java.util.Map.Entry
    public final int hashCode() {
        if (!this.f16173s) {
            throw new IllegalStateException("This container does not support retaining Map.Entry objects");
        }
        int i = this.f16172r;
        e eVar = this.f16174t;
        Object objE = eVar.e(i);
        Object objH = eVar.h(this.f16172r);
        return (objE == null ? 0 : objE.hashCode()) ^ (objH != null ? objH.hashCode() : 0);
    }

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

    @Override // java.util.Iterator
    public final void remove() {
        if (!this.f16173s) {
            throw new IllegalStateException();
        }
        this.f16174t.f(this.f16172r);
        this.f16172r--;
        this.f16171q--;
        this.f16173s = false;
    }

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

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