package org.joda.time;

import java.io.Serializable;
import org.joda.time.chrono.ISOChronology;

/* loaded from: classes.dex */
public final class LocalDateTime extends mr.d implements Serializable {
    private static final long serialVersionUID = -268716875315837168L;
    private final a iChronology;
    private final long iLocalMillis;

    public LocalDateTime(long j10, a aVar) {
        a c10 = c.c(aVar);
        this.iLocalMillis = c10.m().o(DateTimeZone.f31852p, j10);
        this.iChronology = c10.J();
    }

    private Object readResolve() {
        a aVar = this.iChronology;
        return aVar == null ? new LocalDateTime(this.iLocalMillis, ISOChronology.V()) : !DateTimeZone.f31852p.equals(aVar.m()) ? new LocalDateTime(this.iLocalMillis, this.iChronology.J()) : this;
    }

    @Override // java.lang.Comparable
    /* renamed from: a */
    public int compareTo(i iVar) {
        if (this == iVar) {
            return 0;
        }
        if (iVar instanceof LocalDateTime) {
            LocalDateTime localDateTime = (LocalDateTime) iVar;
            if (this.iChronology.equals(localDateTime.iChronology)) {
                long j10 = this.iLocalMillis;
                long j11 = localDateTime.iLocalMillis;
                if (j10 < j11) {
                    return -1;
                }
                return j10 == j11 ? 0 : 1;
            }
        }
        return super.compareTo(iVar);
    }

    @Override // org.joda.time.i
    public a d() {
        return this.iChronology;
    }

    @Override // mr.c
    protected b e(int i10, a aVar) {
        if (i10 == 0) {
            return aVar.L();
        }
        if (i10 == 1) {
            return aVar.y();
        }
        if (i10 == 2) {
            return aVar.e();
        }
        if (i10 == 3) {
            return aVar.t();
        }
        throw new IndexOutOfBoundsException("Invalid index: " + i10);
    }

    @Override // mr.c
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof LocalDateTime) {
            LocalDateTime localDateTime = (LocalDateTime) obj;
            if (this.iChronology.equals(localDateTime.iChronology)) {
                return this.iLocalMillis == localDateTime.iLocalMillis;
            }
        }
        return super.equals(obj);
    }

    @Override // org.joda.time.i
    public int f(int i10) {
        if (i10 == 0) {
            return d().L().c(s());
        }
        if (i10 == 1) {
            return d().y().c(s());
        }
        if (i10 == 2) {
            return d().e().c(s());
        }
        if (i10 == 3) {
            return d().t().c(s());
        }
        throw new IndexOutOfBoundsException("Invalid index: " + i10);
    }

    @Override // mr.c
    public int hashCode() {
        return ((((((((((((((3611 + this.iChronology.L().c(this.iLocalMillis)) * 23) + this.iChronology.L().s().hashCode()) * 23) + this.iChronology.y().c(this.iLocalMillis)) * 23) + this.iChronology.y().s().hashCode()) * 23) + this.iChronology.e().c(this.iLocalMillis)) * 23) + this.iChronology.e().s().hashCode()) * 23) + this.iChronology.t().c(this.iLocalMillis)) * 23) + this.iChronology.t().s().hashCode() + d().hashCode();
    }

    public DateTime j() {
        return y(null);
    }

    public int m() {
        return d().e().c(s());
    }

    @Override // org.joda.time.i
    public boolean p(DateTimeFieldType dateTimeFieldType) {
        if (dateTimeFieldType == null) {
            return false;
        }
        return dateTimeFieldType.F(d()).v();
    }

    @Override // org.joda.time.i
    public int q(DateTimeFieldType dateTimeFieldType) {
        if (dateTimeFieldType != null) {
            return dateTimeFieldType.F(d()).c(s());
        }
        throw new IllegalArgumentException("The DateTimeFieldType must not be null");
    }

    public int r() {
        return d().p().c(s());
    }

    protected long s() {
        return this.iLocalMillis;
    }

    @Override // org.joda.time.i
    public int size() {
        return 4;
    }

    public int t() {
        return d().u().c(s());
    }

    public String toString() {
        return org.joda.time.format.i.b().j(this);
    }

    public int u() {
        return d().w().c(s());
    }

    public int v() {
        return d().y().c(s());
    }

    public int w() {
        return d().B().c(s());
    }

    public int x() {
        return d().L().c(s());
    }

    public DateTime y(DateTimeZone dateTimeZone) {
        return new DateTime(x(), v(), m(), r(), u(), w(), t(), this.iChronology.K(c.h(dateTimeZone)));
    }

    public LocalDate z() {
        return new LocalDate(s(), d());
    }
}
