- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
60 lines
1.5 KiB
Java
60 lines
1.5 KiB
Java
package com.google.firebase.perf.metrics;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import java.util.concurrent.atomic.AtomicLong;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class Counter implements Parcelable {
|
|
public static final Parcelable.Creator<Counter> CREATOR = new Parcelable.Creator() { // from class: com.google.firebase.perf.metrics.Counter.1
|
|
@Override // android.os.Parcelable.Creator
|
|
public Counter createFromParcel(Parcel parcel) {
|
|
return new Counter(parcel);
|
|
}
|
|
|
|
@Override // android.os.Parcelable.Creator
|
|
public Counter[] newArray(int i) {
|
|
return new Counter[i];
|
|
}
|
|
};
|
|
public final AtomicLong count;
|
|
public final String name;
|
|
|
|
@Override // android.os.Parcelable
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
public String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
public Counter(String str) {
|
|
this.name = str;
|
|
this.count = new AtomicLong(0L);
|
|
}
|
|
|
|
public Counter(Parcel parcel) {
|
|
this.name = parcel.readString();
|
|
this.count = new AtomicLong(parcel.readLong());
|
|
}
|
|
|
|
public void increment(long j) {
|
|
this.count.addAndGet(j);
|
|
}
|
|
|
|
public long getCount() {
|
|
return this.count.get();
|
|
}
|
|
|
|
public void setCount(long j) {
|
|
this.count.set(j);
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
parcel.writeString(this.name);
|
|
parcel.writeLong(this.count.get());
|
|
}
|
|
}
|