126 lines
4.5 KiB
Java
126 lines
4.5 KiB
Java
|
package o;
|
||
|
|
||
|
import java.io.Serializable;
|
||
|
import o.gsJ;
|
||
|
import org.threeten.bp.DateTimeException;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public abstract class gsK<D extends gsJ> extends gsJ implements Serializable {
|
||
|
private static final long serialVersionUID = 6282433883239719096L;
|
||
|
|
||
|
abstract gsK<D> plusDays(long j);
|
||
|
|
||
|
abstract gsK<D> plusMonths(long j);
|
||
|
|
||
|
abstract gsK<D> plusYears(long j);
|
||
|
|
||
|
@Override // o.gsJ, o.InterfaceC15536gtL
|
||
|
public gsK<D> plus(long j, InterfaceC15539gtV interfaceC15539gtV) {
|
||
|
if (interfaceC15539gtV instanceof gtH) {
|
||
|
switch (AnonymousClass2.$SwitchMap$org$threeten$bp$temporal$ChronoUnit[((gtH) interfaceC15539gtV).ordinal()]) {
|
||
|
case 1:
|
||
|
return plusDays(j);
|
||
|
case 2:
|
||
|
return plusDays(gtG.safeMultiply(j, 7));
|
||
|
case 3:
|
||
|
return plusMonths(j);
|
||
|
case 4:
|
||
|
return plusYears(j);
|
||
|
case 5:
|
||
|
return plusYears(gtG.safeMultiply(j, 10));
|
||
|
case 6:
|
||
|
return plusYears(gtG.safeMultiply(j, 100));
|
||
|
case 7:
|
||
|
return plusYears(gtG.safeMultiply(j, 1000));
|
||
|
default:
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(interfaceC15539gtV);
|
||
|
sb.append(" not valid for chronology ");
|
||
|
sb.append(getChronology().getId());
|
||
|
throw new DateTimeException(sb.toString());
|
||
|
}
|
||
|
}
|
||
|
return (gsK) getChronology().ensureChronoLocalDate(interfaceC15539gtV.addTo(this, j));
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* renamed from: o.gsK$2, reason: invalid class name */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public static /* synthetic */ class AnonymousClass2 {
|
||
|
static final int[] $SwitchMap$org$threeten$bp$temporal$ChronoUnit;
|
||
|
|
||
|
static {
|
||
|
int[] iArr = new int[gtH.values().length];
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoUnit = iArr;
|
||
|
try {
|
||
|
iArr[gtH.DAYS.ordinal()] = 1;
|
||
|
} catch (NoSuchFieldError unused) {
|
||
|
}
|
||
|
try {
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.WEEKS.ordinal()] = 2;
|
||
|
} catch (NoSuchFieldError unused2) {
|
||
|
}
|
||
|
try {
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.MONTHS.ordinal()] = 3;
|
||
|
} catch (NoSuchFieldError unused3) {
|
||
|
}
|
||
|
try {
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.YEARS.ordinal()] = 4;
|
||
|
} catch (NoSuchFieldError unused4) {
|
||
|
}
|
||
|
try {
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.DECADES.ordinal()] = 5;
|
||
|
} catch (NoSuchFieldError unused5) {
|
||
|
}
|
||
|
try {
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.CENTURIES.ordinal()] = 6;
|
||
|
} catch (NoSuchFieldError unused6) {
|
||
|
}
|
||
|
try {
|
||
|
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.MILLENNIA.ordinal()] = 7;
|
||
|
} catch (NoSuchFieldError unused7) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
gsK<D> plusWeeks(long j) {
|
||
|
return plusDays(gtG.safeMultiply(j, 7));
|
||
|
}
|
||
|
|
||
|
gsK<D> minusYears(long j) {
|
||
|
return j == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1L) : plusYears(-j);
|
||
|
}
|
||
|
|
||
|
gsK<D> minusMonths(long j) {
|
||
|
return j == Long.MIN_VALUE ? plusMonths(Long.MAX_VALUE).plusMonths(1L) : plusMonths(-j);
|
||
|
}
|
||
|
|
||
|
gsK<D> minusWeeks(long j) {
|
||
|
return j == Long.MIN_VALUE ? plusWeeks(Long.MAX_VALUE).plusWeeks(1L) : plusWeeks(-j);
|
||
|
}
|
||
|
|
||
|
gsK<D> minusDays(long j) {
|
||
|
return j == Long.MIN_VALUE ? plusDays(Long.MAX_VALUE).plusDays(1L) : plusDays(-j);
|
||
|
}
|
||
|
|
||
|
@Override // o.gsJ
|
||
|
public gsO<?> atTime(C15521gsq c15521gsq) {
|
||
|
return gsL.of(this, c15521gsq);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15536gtL
|
||
|
public long until(InterfaceC15536gtL interfaceC15536gtL, InterfaceC15539gtV interfaceC15539gtV) {
|
||
|
gsJ date = getChronology().date(interfaceC15536gtL);
|
||
|
if (interfaceC15539gtV instanceof gtH) {
|
||
|
return C15520gsp.from((gtK) this).until(date, interfaceC15539gtV);
|
||
|
}
|
||
|
return interfaceC15539gtV.between(this, date);
|
||
|
}
|
||
|
|
||
|
@Override // o.gsJ
|
||
|
public gsT until(gsJ gsj) {
|
||
|
throw new UnsupportedOperationException("Not supported in ThreeTen backport");
|
||
|
}
|
||
|
}
|