what-the-bank/sources/o/UJG.java

98 lines
2.8 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Arrays;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
/* loaded from: classes2.dex */
public final class UJG implements Comparable<UJG>, Parcelable {
public static final Parcelable.Creator<UJG> CREATOR = new Parcelable.Creator<UJG>() { // from class: o.UJG.5
@Override // android.os.Parcelable.Creator
public final /* synthetic */ UJG createFromParcel(Parcel parcel) {
return UJG.d(parcel.readInt(), parcel.readInt());
}
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ UJG[] newArray(int i) {
return new UJG[i];
}
};
public final int a;
public String b;
public final Calendar c;
final int d;
public final int e;
public final int g;
public final long i;
@Override // android.os.Parcelable
public final int describeContents() {
return 0;
}
@Override // java.lang.Comparable
public final /* bridge */ /* synthetic */ int compareTo(UJG ujg) {
return this.c.compareTo(ujg.c);
}
public UJG(Calendar calendar) {
calendar.set(5, 1);
Calendar c = OnG.c(calendar);
this.c = c;
this.d = c.get(2);
this.g = c.get(1);
this.e = c.getMaximum(7);
this.a = c.getActualMaximum(5);
this.i = c.getTimeInMillis();
}
public final int e(int i) {
int i2 = this.c.get(7);
if (i <= 0) {
i = this.c.getFirstDayOfWeek();
}
int i3 = i2 - i;
return i3 < 0 ? i3 + this.e : i3;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof UJG)) {
return false;
}
UJG ujg = (UJG) obj;
return this.d == ujg.d && this.g == ujg.g;
}
public final int hashCode() {
return Arrays.hashCode(new Object[]{Integer.valueOf(this.d), Integer.valueOf(this.g)});
}
public final int c(UJG ujg) {
if (this.c instanceof GregorianCalendar) {
return ((ujg.g - this.g) * 12) + (ujg.d - this.d);
}
throw new IllegalArgumentException("Only Gregorian calendars are supported.");
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.g);
parcel.writeInt(this.d);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static UJG d(int i, int i2) {
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
calendar.clear();
calendar.set(1, i);
calendar.set(2, i2);
return new UJG(calendar);
}
}