public final class TimerStat extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<TimerStat> |
CREATOR
The CREATOR instance for use by aidl Binder interfaces.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
TimerStat()
Construct an empty TimerStat object with the count and time set to 0.
|
TimerStat(int count,
long time)
Construct a TimerStat object with the supplied count and time fields.
|
TimerStat(Parcel in)
Construct a TimerStat object reading the values from a
Parcel
object. |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
int |
getCount()
Get the count for this timer.
|
long |
getTime()
Get the time for this timer in milliseconds.
|
void |
setCount(int count)
Set the count for this timer.
|
void |
setTime(long time)
Set the time for this timer in milliseconds.
|
void |
writeToParcel(Parcel out,
int flags)
Write this TimerStat object to a parcel.
|
public static final Parcelable.Creator<TimerStat> CREATOR
public TimerStat()
public TimerStat(int count, long time)
count
- The counttime
- The timepublic int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel out, int flags)
writeToParcel
in interface Parcelable
out
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public void setCount(int count)
public int getCount()
public void setTime(long time)
public long getTime()