package o;

import android.os.Parcel;
import android.os.Parcelable;
import java.util.Arrays;
import java.util.Objects;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Wf, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0576Wf implements Parcelable {
    public static final Parcelable.Creator<C0576Wf> CREATOR = new C2487t1(4);
    public final TP l;
    public final TP m;
    public final C0119Ep n;

    /* renamed from: o, reason: collision with root package name */
    public final TP f398o;
    public final int p;
    public final int q;
    public final int r;

    public C0576Wf(TP tp, TP tp2, C0119Ep c0119Ep, TP tp3, int i) {
        Objects.requireNonNull(tp, "start cannot be null");
        Objects.requireNonNull(tp2, "end cannot be null");
        Objects.requireNonNull(c0119Ep, "validator cannot be null");
        this.l = tp;
        this.m = tp2;
        this.f398o = tp3;
        this.p = i;
        this.n = c0119Ep;
        if (tp3 != null && tp.l.compareTo(tp3.l) > 0) {
            throw new IllegalArgumentException("start Month cannot be after current Month");
        }
        if (tp3 != null && tp3.l.compareTo(tp2.l) > 0) {
            throw new IllegalArgumentException("current Month cannot be after end Month");
        }
        if (i < 0 || i > AbstractC1789li0.c(null).getMaximum(7)) {
            throw new IllegalArgumentException("firstDayOfWeek is not valid");
        }
        this.r = tp.d(tp2) + 1;
        this.q = (tp2.n - tp.n) + 1;
    }

    @Override // android.os.Parcelable
    public final int describeContents() {
        return 0;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof C0576Wf)) {
            return false;
        }
        C0576Wf c0576Wf = (C0576Wf) obj;
        return this.l.equals(c0576Wf.l) && this.m.equals(c0576Wf.m) && Objects.equals(this.f398o, c0576Wf.f398o) && this.p == c0576Wf.p && this.n.equals(c0576Wf.n);
    }

    public final int hashCode() {
        return Arrays.hashCode(new Object[]{this.l, this.m, this.f398o, Integer.valueOf(this.p), this.n});
    }

    @Override // android.os.Parcelable
    public final void writeToParcel(Parcel parcel, int i) {
        parcel.writeParcelable(this.l, 0);
        parcel.writeParcelable(this.m, 0);
        parcel.writeParcelable(this.f398o, 0);
        parcel.writeParcelable(this.n, 0);
        parcel.writeInt(this.p);
    }
}
