276 lines
11 KiB
Java
276 lines
11 KiB
Java
package o;
|
|
|
|
import com.huawei.hms.framework.common.hianalytics.CrashHianalyticsData;
|
|
import java.io.DataInput;
|
|
import java.io.DataOutput;
|
|
import java.io.IOException;
|
|
import java.io.Serializable;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public final class gtX implements Serializable {
|
|
private static final int SECS_PER_DAY = 86400;
|
|
private static final long serialVersionUID = 6889046316657758795L;
|
|
private final int adjustDays;
|
|
private final byte dom;
|
|
private final EnumC15515gsk dow;
|
|
private final EnumC15528gsx month;
|
|
private final gsI offsetAfter;
|
|
private final gsI offsetBefore;
|
|
private final gsI standardOffset;
|
|
private final C15521gsq time;
|
|
private final RVV timeDefinition;
|
|
|
|
public static gtX of(EnumC15528gsx enumC15528gsx, int i, EnumC15515gsk enumC15515gsk, C15521gsq c15521gsq, boolean z, RVV rvv, gsI gsi, gsI gsi2, gsI gsi3) {
|
|
gtG.requireNonNull(enumC15528gsx, "month");
|
|
gtG.requireNonNull(c15521gsq, CrashHianalyticsData.TIME);
|
|
gtG.requireNonNull(rvv, "timeDefnition");
|
|
gtG.requireNonNull(gsi, "standardOffset");
|
|
gtG.requireNonNull(gsi2, "offsetBefore");
|
|
gtG.requireNonNull(gsi3, "offsetAfter");
|
|
if (i < -28 || i > 31 || i == 0) {
|
|
throw new IllegalArgumentException("Day of month indicator must be between -28 and 31 inclusive excluding zero");
|
|
}
|
|
if (z && !c15521gsq.equals(C15521gsq.MIDNIGHT)) {
|
|
throw new IllegalArgumentException("Time must be midnight when end of day flag is true");
|
|
}
|
|
return new gtX(enumC15528gsx, i, enumC15515gsk, c15521gsq, z ? 1 : 0, rvv, gsi, gsi2, gsi3);
|
|
}
|
|
|
|
gtX(EnumC15528gsx enumC15528gsx, int i, EnumC15515gsk enumC15515gsk, C15521gsq c15521gsq, int i2, RVV rvv, gsI gsi, gsI gsi2, gsI gsi3) {
|
|
this.month = enumC15528gsx;
|
|
this.dom = (byte) i;
|
|
this.dow = enumC15515gsk;
|
|
this.time = c15521gsq;
|
|
this.adjustDays = i2;
|
|
this.timeDefinition = rvv;
|
|
this.standardOffset = gsi;
|
|
this.offsetBefore = gsi2;
|
|
this.offsetAfter = gsi3;
|
|
}
|
|
|
|
private Object writeReplace() {
|
|
return new gtU((byte) 3, this);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final void writeExternal(DataOutput dataOutput) throws IOException {
|
|
int i;
|
|
int secondOfDay = this.time.toSecondOfDay() + (this.adjustDays * SECS_PER_DAY);
|
|
int totalSeconds = this.standardOffset.getTotalSeconds();
|
|
int totalSeconds2 = this.offsetBefore.getTotalSeconds() - totalSeconds;
|
|
int totalSeconds3 = this.offsetAfter.getTotalSeconds() - totalSeconds;
|
|
if (secondOfDay % 3600 != 0 || secondOfDay > SECS_PER_DAY) {
|
|
i = 31;
|
|
} else {
|
|
i = secondOfDay == SECS_PER_DAY ? 24 : this.time.getHour();
|
|
}
|
|
int i2 = totalSeconds % 900 == 0 ? (totalSeconds / 900) + 128 : 255;
|
|
int i3 = (totalSeconds2 == 0 || totalSeconds2 == 1800 || totalSeconds2 == 3600) ? totalSeconds2 / 1800 : 3;
|
|
int i4 = (totalSeconds3 == 0 || totalSeconds3 == 1800 || totalSeconds3 == 3600) ? totalSeconds3 / 1800 : 3;
|
|
EnumC15515gsk enumC15515gsk = this.dow;
|
|
dataOutput.writeInt((this.month.getValue() << 28) + ((this.dom + 32) << 22) + ((enumC15515gsk == null ? 0 : enumC15515gsk.getValue()) << 19) + (i << 14) + (this.timeDefinition.ordinal() << 12) + (i2 << 4) + (i3 << 2) + i4);
|
|
if (i == 31) {
|
|
dataOutput.writeInt(secondOfDay);
|
|
}
|
|
if (i2 == 255) {
|
|
dataOutput.writeInt(totalSeconds);
|
|
}
|
|
if (i3 == 3) {
|
|
dataOutput.writeInt(this.offsetBefore.getTotalSeconds());
|
|
}
|
|
if (i4 == 3) {
|
|
dataOutput.writeInt(this.offsetAfter.getTotalSeconds());
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static gtX readExternal(DataInput dataInput) throws IOException {
|
|
int readInt = dataInput.readInt();
|
|
EnumC15528gsx of = EnumC15528gsx.of(readInt >>> 28);
|
|
int i = ((264241152 & readInt) >>> 22) - 32;
|
|
int i2 = (3670016 & readInt) >>> 19;
|
|
EnumC15515gsk of2 = i2 == 0 ? null : EnumC15515gsk.of(i2);
|
|
int i3 = (507904 & readInt) >>> 14;
|
|
RVV rvv = RVV.values()[(readInt & com.kofax.kmc.kut.utilities.error.a.sL) >>> 12];
|
|
int i4 = (readInt & 4080) >>> 4;
|
|
int i5 = (readInt & 12) >>> 2;
|
|
int i6 = readInt & 3;
|
|
int readInt2 = i3 == 31 ? dataInput.readInt() : i3 * 3600;
|
|
gsI ofTotalSeconds = gsI.ofTotalSeconds(i4 == 255 ? dataInput.readInt() : (i4 - 128) * 900);
|
|
gsI ofTotalSeconds2 = gsI.ofTotalSeconds(i5 == 3 ? dataInput.readInt() : ofTotalSeconds.getTotalSeconds() + (i5 * 1800));
|
|
gsI ofTotalSeconds3 = gsI.ofTotalSeconds(i6 == 3 ? dataInput.readInt() : ofTotalSeconds.getTotalSeconds() + (i6 * 1800));
|
|
if (i < -28 || i > 31 || i == 0) {
|
|
throw new IllegalArgumentException("Day of month indicator must be between -28 and 31 inclusive excluding zero");
|
|
}
|
|
return new gtX(of, i, of2, C15521gsq.ofSecondOfDay(gtG.floorMod(readInt2, SECS_PER_DAY)), gtG.floorDiv(readInt2, SECS_PER_DAY), rvv, ofTotalSeconds, ofTotalSeconds2, ofTotalSeconds3);
|
|
}
|
|
|
|
public final boolean isMidnightEndOfDay() {
|
|
return this.adjustDays == 1 && this.time.equals(C15521gsq.MIDNIGHT);
|
|
}
|
|
|
|
public final gtW createTransition(int i) {
|
|
C15520gsp of;
|
|
byte b = this.dom;
|
|
if (b < 0) {
|
|
EnumC15528gsx enumC15528gsx = this.month;
|
|
of = C15520gsp.of(i, enumC15528gsx, enumC15528gsx.length(gsV.INSTANCE.isLeapYear(i)) + 1 + this.dom);
|
|
EnumC15515gsk enumC15515gsk = this.dow;
|
|
if (enumC15515gsk != null) {
|
|
of = of.with(gtO.previousOrSame(enumC15515gsk));
|
|
}
|
|
} else {
|
|
of = C15520gsp.of(i, this.month, b);
|
|
EnumC15515gsk enumC15515gsk2 = this.dow;
|
|
if (enumC15515gsk2 != null) {
|
|
of = of.with(gtO.nextOrSame(enumC15515gsk2));
|
|
}
|
|
}
|
|
return new gtW(this.timeDefinition.createDateTime(C15522gsr.of(of.plusDays(this.adjustDays), this.time), this.standardOffset, this.offsetBefore), this.offsetBefore, this.offsetAfter);
|
|
}
|
|
|
|
public final boolean equals(Object obj) {
|
|
if (obj == this) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof gtX)) {
|
|
return false;
|
|
}
|
|
gtX gtx = (gtX) obj;
|
|
return this.month == gtx.month && this.dom == gtx.dom && this.dow == gtx.dow && this.timeDefinition == gtx.timeDefinition && this.adjustDays == gtx.adjustDays && this.time.equals(gtx.time) && this.standardOffset.equals(gtx.standardOffset) && this.offsetBefore.equals(gtx.offsetBefore) && this.offsetAfter.equals(gtx.offsetAfter);
|
|
}
|
|
|
|
public final int hashCode() {
|
|
int secondOfDay = this.time.toSecondOfDay();
|
|
int i = this.adjustDays;
|
|
int ordinal = this.month.ordinal();
|
|
byte b = this.dom;
|
|
EnumC15515gsk enumC15515gsk = this.dow;
|
|
int ordinal2 = enumC15515gsk == null ? 7 : enumC15515gsk.ordinal();
|
|
return ((((((((secondOfDay + i) << 15) + (ordinal << 11)) + ((b + 32) << 5)) + (ordinal2 << 2)) + this.timeDefinition.ordinal()) ^ this.standardOffset.hashCode()) ^ this.offsetBefore.hashCode()) ^ this.offsetAfter.hashCode();
|
|
}
|
|
|
|
public final String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("TransitionRule[");
|
|
sb.append(this.offsetBefore.compareTo2(this.offsetAfter) > 0 ? "Gap " : "Overlap ");
|
|
sb.append(this.offsetBefore);
|
|
sb.append(" to ");
|
|
sb.append(this.offsetAfter);
|
|
sb.append(", ");
|
|
EnumC15515gsk enumC15515gsk = this.dow;
|
|
if (enumC15515gsk != null) {
|
|
byte b = this.dom;
|
|
if (b == -1) {
|
|
sb.append(enumC15515gsk.name());
|
|
sb.append(" on or before last day of ");
|
|
sb.append(this.month.name());
|
|
} else if (b < 0) {
|
|
sb.append(enumC15515gsk.name());
|
|
sb.append(" on or before last day minus ");
|
|
sb.append((-this.dom) - 1);
|
|
sb.append(" of ");
|
|
sb.append(this.month.name());
|
|
} else {
|
|
sb.append(enumC15515gsk.name());
|
|
sb.append(" on or after ");
|
|
sb.append(this.month.name());
|
|
sb.append(' ');
|
|
sb.append((int) this.dom);
|
|
}
|
|
} else {
|
|
sb.append(this.month.name());
|
|
sb.append(' ');
|
|
sb.append((int) this.dom);
|
|
}
|
|
sb.append(" at ");
|
|
if (this.adjustDays == 0) {
|
|
sb.append(this.time);
|
|
} else {
|
|
appendZeroPad(sb, gtG.floorDiv((this.time.toSecondOfDay() / 60) + (this.adjustDays * 1440), 60L));
|
|
sb.append(':');
|
|
appendZeroPad(sb, gtG.floorMod(r3, 60));
|
|
}
|
|
sb.append(" ");
|
|
sb.append(this.timeDefinition);
|
|
sb.append(", standard offset ");
|
|
sb.append(this.standardOffset);
|
|
sb.append(']');
|
|
return sb.toString();
|
|
}
|
|
|
|
private void appendZeroPad(StringBuilder sb, long j) {
|
|
if (j < 10) {
|
|
sb.append(0);
|
|
}
|
|
sb.append(j);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* renamed from: o.gtX$1, reason: invalid class name */
|
|
/* loaded from: classes6.dex */
|
|
public static /* synthetic */ class AnonymousClass1 {
|
|
static final int[] $SwitchMap$org$threeten$bp$zone$ZoneOffsetTransitionRule$TimeDefinition;
|
|
|
|
static {
|
|
int[] iArr = new int[RVV.values().length];
|
|
$SwitchMap$org$threeten$bp$zone$ZoneOffsetTransitionRule$TimeDefinition = iArr;
|
|
try {
|
|
iArr[RVV.UTC.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
$SwitchMap$org$threeten$bp$zone$ZoneOffsetTransitionRule$TimeDefinition[RVV.STANDARD.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes6.dex */
|
|
public enum RVV {
|
|
UTC,
|
|
WALL,
|
|
STANDARD;
|
|
|
|
public final C15522gsr createDateTime(C15522gsr c15522gsr, gsI gsi, gsI gsi2) {
|
|
int i = AnonymousClass1.$SwitchMap$org$threeten$bp$zone$ZoneOffsetTransitionRule$TimeDefinition[ordinal()];
|
|
if (i != 1) {
|
|
return i != 2 ? c15522gsr : c15522gsr.plusSeconds(gsi2.getTotalSeconds() - gsi.getTotalSeconds());
|
|
}
|
|
return c15522gsr.plusSeconds(gsi2.getTotalSeconds() - gsI.UTC.getTotalSeconds());
|
|
}
|
|
}
|
|
|
|
public final RVV getTimeDefinition() {
|
|
return this.timeDefinition;
|
|
}
|
|
|
|
public final gsI getStandardOffset() {
|
|
return this.standardOffset;
|
|
}
|
|
|
|
public final gsI getOffsetBefore() {
|
|
return this.offsetBefore;
|
|
}
|
|
|
|
public final gsI getOffsetAfter() {
|
|
return this.offsetAfter;
|
|
}
|
|
|
|
public final EnumC15528gsx getMonth() {
|
|
return this.month;
|
|
}
|
|
|
|
public final C15521gsq getLocalTime() {
|
|
return this.time;
|
|
}
|
|
|
|
public final EnumC15515gsk getDayOfWeek() {
|
|
return this.dow;
|
|
}
|
|
|
|
public final int getDayOfMonthIndicator() {
|
|
return this.dom;
|
|
}
|
|
}
|