Page Summary
-
Goal.DurationObjective is a class for defining goals based on the duration of activities, such as 30 minutes or 2 hours.
-
It implements the Parcelable interface, indicating it can be flattened into a Parcel.
-
The class has a constructor that takes a duration and a time unit to define the objective.
-
A public method
getDurationis available to retrieve the objective duration in a specified time unit.
A duration objective, which uses duration time of activities to determine whether the goal is met. For example, 30 minutes or 2 hours.
Inherited Constant Summary
Field Summary
| public static final Creator<Goal.DurationObjective> | CREATOR |
Public Constructor Summary
|
DurationObjective(long duration, TimeUnit
timeUnit)
|
Public Method Summary
| boolean | |
| long |
getDuration(TimeUnit
timeUnit)
Returns the objective duration of the goal in the specified time unit.
|
| int |
hashCode()
|
| String |
toString()
|
| void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Fields
public static final Creator<Goal.DurationObjective> CREATOR
Public Constructors
public DurationObjective (long duration, TimeUnit timeUnit)
Public Methods
public boolean equals (Object other)
public long getDuration (TimeUnit timeUnit)
Returns the objective duration of the goal in the specified time unit. For example returns 30 minutes for a goal to "walk 30 minutes a day".