package o;

import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.xR, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2902xR {
    public final List a;
    public final int b;

    public C2902xR(int i, List list) {
        this.a = list;
        this.b = i;
        if (list.isEmpty() && i == -1) {
            return;
        }
        if (!list.isEmpty()) {
            int size = list.size();
            if (i >= 0 && i < size) {
                return;
            }
        }
        StringBuilder sbO = AbstractC0126Ew.o(i, "Invalid 'NavigationEventHistory' state:  'currentIndex' must be within the bounds of 'mergedHistory' (or -1 if empty). Received: currentIndex = '", "', bounds = '");
        sbO.append(new C0991dI(0, list.size() - 1, 1));
        sbO.append("'.");
        throw new IllegalArgumentException(sbO.toString().toString());
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || C2902xR.class != obj.getClass()) {
            return false;
        }
        C2902xR c2902xR = (C2902xR) obj;
        return this.b == c2902xR.b && F3.c(this.a, c2902xR.a);
    }

    public final int hashCode() {
        return this.a.hashCode() + (this.b * 31);
    }

    public final String toString() {
        return "NavigationEventHistory(currentIndex=" + this.b + ", mergedHistory=" + this.a + ')';
    }

    public C2902xR() {
        this(-1, C0332Mv.l);
    }
}
