269 lines
10 KiB
Java
269 lines
10 KiB
Java
|
package o;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
import java.io.InvalidObjectException;
|
||
|
import java.io.ObjectInput;
|
||
|
import java.io.ObjectOutput;
|
||
|
import java.io.ObjectStreamException;
|
||
|
import java.io.Serializable;
|
||
|
import o.gsJ;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class gsP<D extends gsJ> extends gsS<D> implements Serializable {
|
||
|
private static final long serialVersionUID = -5261813987200935591L;
|
||
|
private final gsL<D> dateTime;
|
||
|
private final gsI offset;
|
||
|
private final AbstractC15502gsH zone;
|
||
|
|
||
|
@Override // o.gsS, o.InterfaceC15536gtL
|
||
|
public final /* bridge */ /* synthetic */ InterfaceC15536gtL plus(long j, InterfaceC15539gtV interfaceC15539gtV) {
|
||
|
return plus(j, interfaceC15539gtV);
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS, o.InterfaceC15536gtL
|
||
|
public final /* bridge */ /* synthetic */ InterfaceC15536gtL with(InterfaceC15537gtP interfaceC15537gtP, long j) {
|
||
|
return with(interfaceC15537gtP, j);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:15:0x004b, code lost:
|
||
|
|
||
|
if (r2.contains(r7) != false) goto L15;
|
||
|
*/
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public static <R extends o.gsJ> o.gsS<R> ofBest(o.gsL<R> r5, o.AbstractC15502gsH r6, o.gsI r7) {
|
||
|
/*
|
||
|
java.lang.String r0 = "localDateTime"
|
||
|
o.gtG.requireNonNull(r5, r0)
|
||
|
java.lang.String r0 = "zone"
|
||
|
o.gtG.requireNonNull(r6, r0)
|
||
|
boolean r0 = r6 instanceof o.gsI
|
||
|
if (r0 == 0) goto L17
|
||
|
o.gsP r7 = new o.gsP
|
||
|
r0 = r6
|
||
|
o.gsI r0 = (o.gsI) r0
|
||
|
r7.<init>(r5, r0, r6)
|
||
|
return r7
|
||
|
L17:
|
||
|
o.gua r0 = r6.getRules()
|
||
|
o.gsr r1 = o.C15522gsr.from(r5)
|
||
|
java.util.List r2 = r0.getValidOffsets(r1)
|
||
|
int r3 = r2.size()
|
||
|
r4 = 1
|
||
|
if (r3 == r4) goto L4d
|
||
|
int r3 = r2.size()
|
||
|
if (r3 != 0) goto L45
|
||
|
o.gtW r7 = r0.getTransition(r1)
|
||
|
o.gso r0 = r7.getDuration()
|
||
|
long r0 = r0.getSeconds()
|
||
|
o.gsL r5 = r5.plusSeconds(r0)
|
||
|
o.gsI r7 = r7.getOffsetAfter()
|
||
|
goto L54
|
||
|
L45:
|
||
|
if (r7 == 0) goto L4d
|
||
|
boolean r0 = r2.contains(r7)
|
||
|
if (r0 != 0) goto L54
|
||
|
L4d:
|
||
|
r7 = 0
|
||
|
java.lang.Object r7 = r2.get(r7)
|
||
|
o.gsI r7 = (o.gsI) r7
|
||
|
L54:
|
||
|
java.lang.String r0 = "offset"
|
||
|
o.gtG.requireNonNull(r7, r0)
|
||
|
o.gsP r0 = new o.gsP
|
||
|
r0.<init>(r5, r7, r6)
|
||
|
return r0
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.gsP.ofBest(o.gsL, o.gsH, o.gsI):o.gsS");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static <R extends gsJ> gsP<R> ofInstant(gsR gsr, C15523gss c15523gss, AbstractC15502gsH abstractC15502gsH) {
|
||
|
gsI offset = abstractC15502gsH.getRules().getOffset(c15523gss);
|
||
|
gtG.requireNonNull(offset, "offset");
|
||
|
return new gsP<>((gsL) gsr.localDateTime(C15522gsr.ofEpochSecond(c15523gss.getEpochSecond(), c15523gss.getNano(), offset)), offset, abstractC15502gsH);
|
||
|
}
|
||
|
|
||
|
private gsP<D> create(C15523gss c15523gss, AbstractC15502gsH abstractC15502gsH) {
|
||
|
return ofInstant(toLocalDate().getChronology(), c15523gss, abstractC15502gsH);
|
||
|
}
|
||
|
|
||
|
private gsP(gsL<D> gsl, gsI gsi, AbstractC15502gsH abstractC15502gsH) {
|
||
|
this.dateTime = (gsL) gtG.requireNonNull(gsl, "dateTime");
|
||
|
this.offset = (gsI) gtG.requireNonNull(gsi, "offset");
|
||
|
this.zone = (AbstractC15502gsH) gtG.requireNonNull(abstractC15502gsH, "zone");
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15536gtL
|
||
|
public final boolean isSupported(InterfaceC15539gtV interfaceC15539gtV) {
|
||
|
return interfaceC15539gtV instanceof gtH ? interfaceC15539gtV.isDateBased() || interfaceC15539gtV.isTimeBased() : interfaceC15539gtV != null && interfaceC15539gtV.isSupportedBy(this);
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
/* renamed from: withEarlierOffsetAtOverlap */
|
||
|
public final gsS<D> withEarlierOffsetAtOverlap2() {
|
||
|
gtW transition = getZone().getRules().getTransition(C15522gsr.from((gtK) this));
|
||
|
if (transition != null && transition.isOverlap()) {
|
||
|
gsI offsetBefore = transition.getOffsetBefore();
|
||
|
if (!offsetBefore.equals(this.offset)) {
|
||
|
return new gsP(this.dateTime, offsetBefore, this.zone);
|
||
|
}
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
/* renamed from: withLaterOffsetAtOverlap */
|
||
|
public final gsS<D> withLaterOffsetAtOverlap2() {
|
||
|
gtW transition = getZone().getRules().getTransition(C15522gsr.from((gtK) this));
|
||
|
if (transition != null) {
|
||
|
gsI offsetAfter = transition.getOffsetAfter();
|
||
|
if (!offsetAfter.equals(getOffset())) {
|
||
|
return new gsP(this.dateTime, offsetAfter, this.zone);
|
||
|
}
|
||
|
}
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
/* renamed from: withZoneSameLocal */
|
||
|
public final gsS<D> withZoneSameLocal2(AbstractC15502gsH abstractC15502gsH) {
|
||
|
return ofBest(this.dateTime, abstractC15502gsH, this.offset);
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
/* renamed from: withZoneSameInstant */
|
||
|
public final gsS<D> withZoneSameInstant2(AbstractC15502gsH abstractC15502gsH) {
|
||
|
gtG.requireNonNull(abstractC15502gsH, "zone");
|
||
|
return this.zone.equals(abstractC15502gsH) ? this : create(this.dateTime.toInstant(this.offset), abstractC15502gsH);
|
||
|
}
|
||
|
|
||
|
@Override // o.gtK
|
||
|
public final boolean isSupported(InterfaceC15537gtP interfaceC15537gtP) {
|
||
|
return (interfaceC15537gtP instanceof EnumC15534gtD) || (interfaceC15537gtP != null && interfaceC15537gtP.isSupportedBy(this));
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS, o.InterfaceC15536gtL
|
||
|
public final gsS<D> with(InterfaceC15537gtP interfaceC15537gtP, long j) {
|
||
|
if (interfaceC15537gtP instanceof EnumC15534gtD) {
|
||
|
EnumC15534gtD enumC15534gtD = (EnumC15534gtD) interfaceC15537gtP;
|
||
|
int i = AnonymousClass4.$SwitchMap$org$threeten$bp$temporal$ChronoField[enumC15534gtD.ordinal()];
|
||
|
if (i == 1) {
|
||
|
return plus(j - toEpochSecond(), (InterfaceC15539gtV) gtH.SECONDS);
|
||
|
}
|
||
|
if (i == 2) {
|
||
|
return create(this.dateTime.toInstant(gsI.ofTotalSeconds(enumC15534gtD.checkValidIntValue(j))), this.zone);
|
||
|
}
|
||
|
return ofBest(this.dateTime.with(interfaceC15537gtP, j), this.zone, this.offset);
|
||
|
}
|
||
|
return toLocalDate().getChronology().ensureChronoZonedDateTime(interfaceC15537gtP.adjustInto(this, j));
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.gsP$4, reason: invalid class name */
|
||
|
/* loaded from: classes6.dex */
|
||
|
static /* synthetic */ class AnonymousClass4 {
|
||
|
static final int[] $SwitchMap$org$threeten$bp$temporal$ChronoField;
|
||
|
|
||
|
static {
|
||
|
int[] iArr = new int[EnumC15534gtD.values().length];
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoField = iArr;
|
||
|
try {
|
||
|
iArr[EnumC15534gtD.INSTANT_SECONDS.ordinal()] = 1;
|
||
|
} catch (NoSuchFieldError unused) {
|
||
|
}
|
||
|
try {
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.OFFSET_SECONDS.ordinal()] = 2;
|
||
|
} catch (NoSuchFieldError unused2) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS, o.InterfaceC15536gtL
|
||
|
public final gsS<D> plus(long j, InterfaceC15539gtV interfaceC15539gtV) {
|
||
|
if (interfaceC15539gtV instanceof gtH) {
|
||
|
return with((gtJ) this.dateTime.plus(j, interfaceC15539gtV));
|
||
|
}
|
||
|
return toLocalDate().getChronology().ensureChronoZonedDateTime(interfaceC15539gtV.addTo(this, j));
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15536gtL
|
||
|
public final long until(InterfaceC15536gtL interfaceC15536gtL, InterfaceC15539gtV interfaceC15539gtV) {
|
||
|
gsS<?> zonedDateTime = toLocalDate().getChronology().zonedDateTime(interfaceC15536gtL);
|
||
|
if (interfaceC15539gtV instanceof gtH) {
|
||
|
return this.dateTime.until(zonedDateTime.withZoneSameInstant2(this.offset).toLocalDateTime(), interfaceC15539gtV);
|
||
|
}
|
||
|
return interfaceC15539gtV.between(this, zonedDateTime);
|
||
|
}
|
||
|
|
||
|
private Object writeReplace() {
|
||
|
return new C15548gti((byte) 13, this);
|
||
|
}
|
||
|
|
||
|
private Object readResolve() throws ObjectStreamException {
|
||
|
throw new InvalidObjectException("Deserialization via serialization delegate");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void writeExternal(ObjectOutput objectOutput) throws IOException {
|
||
|
objectOutput.writeObject(this.dateTime);
|
||
|
objectOutput.writeObject(this.offset);
|
||
|
objectOutput.writeObject(this.zone);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static gsS<?> readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException {
|
||
|
gsO gso = (gsO) objectInput.readObject();
|
||
|
gsI gsi = (gsI) objectInput.readObject();
|
||
|
return gso.atZone2(gsi).withZoneSameLocal2((AbstractC15502gsH) objectInput.readObject());
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (this == obj) {
|
||
|
return true;
|
||
|
}
|
||
|
return (obj instanceof gsS) && compareTo((gsS<?>) obj) == 0;
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
public final int hashCode() {
|
||
|
return (toLocalDateTime().hashCode() ^ getOffset().hashCode()) ^ Integer.rotateLeft(getZone().hashCode(), 3);
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
public final String toString() {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(toLocalDateTime().toString());
|
||
|
sb.append(getOffset().toString());
|
||
|
String obj = sb.toString();
|
||
|
if (getOffset() == getZone()) {
|
||
|
return obj;
|
||
|
}
|
||
|
StringBuilder sb2 = new StringBuilder();
|
||
|
sb2.append(obj);
|
||
|
sb2.append('[');
|
||
|
sb2.append(getZone().toString());
|
||
|
sb2.append(']');
|
||
|
return sb2.toString();
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
public final gsO<D> toLocalDateTime() {
|
||
|
return this.dateTime;
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
public final AbstractC15502gsH getZone() {
|
||
|
return this.zone;
|
||
|
}
|
||
|
|
||
|
@Override // o.gsS
|
||
|
public final gsI getOffset() {
|
||
|
return this.offset;
|
||
|
}
|
||
|
}
|