- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
103 lines
3.6 KiB
Java
103 lines
3.6 KiB
Java
package com.google.firebase;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import kotlin.comparisons.ComparisonsKt__ComparisonsKt;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.PropertyReference1Impl;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class Timestamp implements Comparable<Timestamp>, Parcelable {
|
|
public final int nanoseconds;
|
|
public final long seconds;
|
|
public static final Companion Companion = new Companion(null);
|
|
public static final Parcelable.Creator<Timestamp> CREATOR = new Parcelable.Creator() { // from class: com.google.firebase.Timestamp$Companion$CREATOR$1
|
|
@Override // android.os.Parcelable.Creator
|
|
public Timestamp createFromParcel(Parcel source) {
|
|
Intrinsics.checkNotNullParameter(source, "source");
|
|
return new Timestamp(source.readLong(), source.readInt());
|
|
}
|
|
|
|
@Override // android.os.Parcelable.Creator
|
|
public Timestamp[] newArray(int i) {
|
|
return new Timestamp[i];
|
|
}
|
|
};
|
|
|
|
@Override // android.os.Parcelable
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
public final int getNanoseconds() {
|
|
return this.nanoseconds;
|
|
}
|
|
|
|
public final long getSeconds() {
|
|
return this.seconds;
|
|
}
|
|
|
|
public int hashCode() {
|
|
long j = this.seconds;
|
|
return (((((int) j) * 1369) + ((int) (j >> 32))) * 37) + this.nanoseconds;
|
|
}
|
|
|
|
public Timestamp(long j, int i) {
|
|
Companion.validateRange(j, i);
|
|
this.seconds = j;
|
|
this.nanoseconds = i;
|
|
}
|
|
|
|
@Override // java.lang.Comparable
|
|
public int compareTo(Timestamp other) {
|
|
int compareValuesBy;
|
|
Intrinsics.checkNotNullParameter(other, "other");
|
|
compareValuesBy = ComparisonsKt__ComparisonsKt.compareValuesBy(this, other, new PropertyReference1Impl() { // from class: com.google.firebase.Timestamp$compareTo$1
|
|
@Override // kotlin.jvm.internal.PropertyReference1Impl, kotlin.jvm.internal.PropertyReference1
|
|
public Object get(Object obj) {
|
|
return Long.valueOf(((Timestamp) obj).getSeconds());
|
|
}
|
|
}, new PropertyReference1Impl() { // from class: com.google.firebase.Timestamp$compareTo$2
|
|
@Override // kotlin.jvm.internal.PropertyReference1Impl, kotlin.jvm.internal.PropertyReference1
|
|
public Object get(Object obj) {
|
|
return Integer.valueOf(((Timestamp) obj).getNanoseconds());
|
|
}
|
|
});
|
|
return compareValuesBy;
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
return obj == this || ((obj instanceof Timestamp) && compareTo((Timestamp) obj) == 0);
|
|
}
|
|
|
|
public String toString() {
|
|
return "Timestamp(seconds=" + this.seconds + ", nanoseconds=" + this.nanoseconds + ')';
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(Parcel dest, int i) {
|
|
Intrinsics.checkNotNullParameter(dest, "dest");
|
|
dest.writeLong(this.seconds);
|
|
dest.writeInt(this.nanoseconds);
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public Companion() {
|
|
}
|
|
|
|
public final void validateRange(long j, int i) {
|
|
if (i < 0 || i >= 1000000000) {
|
|
throw new IllegalArgumentException(("Timestamp nanoseconds out of range: " + i).toString());
|
|
}
|
|
if (-62135596800L > j || j >= 253402300800L) {
|
|
throw new IllegalArgumentException(("Timestamp seconds out of range: " + j).toString());
|
|
}
|
|
}
|
|
}
|
|
}
|