package y4;

import java.util.ConcurrentModificationException;
import java.util.Map;
import kotlin.jvm.internal.o;

/* JADX INFO: renamed from: y4.d, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes3.dex */
public final class C3276d implements Map.Entry, K4.d {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final C3277e f26212a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f26213b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f26214c;

    public C3276d(C3277e map, int i6) {
        o.h(map, "map");
        this.f26212a = map;
        this.f26213b = i6;
        this.f26214c = map.f26223k;
    }

    public final void a() {
        if (this.f26212a.f26223k != this.f26214c) {
            throw new ConcurrentModificationException("The backing map has been modified after this entry was obtained.");
        }
    }

    @Override // java.util.Map.Entry
    public final boolean equals(Object obj) {
        if (!(obj instanceof Map.Entry)) {
            return false;
        }
        Map.Entry entry = (Map.Entry) obj;
        return o.c(entry.getKey(), getKey()) && o.c(entry.getValue(), getValue());
    }

    @Override // java.util.Map.Entry
    public final Object getKey() {
        a();
        return this.f26212a.f26216a[this.f26213b];
    }

    @Override // java.util.Map.Entry
    public final Object getValue() {
        a();
        Object[] objArr = this.f26212a.f26217b;
        o.e(objArr);
        return objArr[this.f26213b];
    }

    @Override // java.util.Map.Entry
    public final int hashCode() {
        Object key = getKey();
        int iHashCode = key != null ? key.hashCode() : 0;
        Object value = getValue();
        return iHashCode ^ (value != null ? value.hashCode() : 0);
    }

    @Override // java.util.Map.Entry
    public final Object setValue(Object obj) {
        a();
        C3277e c3277e = this.f26212a;
        c3277e.c();
        Object[] objArr = c3277e.f26217b;
        if (objArr == null) {
            int length = c3277e.f26216a.length;
            if (length < 0) {
                throw new IllegalArgumentException("capacity must be non-negative.");
            }
            objArr = new Object[length];
            c3277e.f26217b = objArr;
        }
        int i6 = this.f26213b;
        Object obj2 = objArr[i6];
        objArr[i6] = obj;
        return obj2;
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getKey());
        sb.append('=');
        sb.append(getValue());
        return sb.toString();
    }
}
