ExerciseGoal
class ExerciseGoal<T : Number> : Parcelable
Defines a goal for an exercise.
Summary
Public companion functions |
|
|---|---|
ExerciseGoal<T> |
<T : Number> createMilestone(Creates an |
ExerciseGoal<T> |
<T : Number> createMilestoneGoalWithUpdatedThreshold(Creates a new goal that is the same as a given goal but with a new threshold value. |
ExerciseGoal<T> |
<T : Number> createOneTimeGoal(Creates an |
Public companion properties |
|
|---|---|
Parcelable.Creator<ExerciseGoal<*>> |
Public functions |
|
|---|---|
open Int |
|
open operator Boolean |
|
open Int |
hashCode() |
open String |
toString() |
open Unit |
writeToParcel(dest: Parcel, flags: Int) |
Public properties |
|
|---|---|
DataTypeCondition<T, AggregateDataType<T, *>> |
|
ExerciseGoalType |
The type of this exercise goal ( |
T? |
Public companion functions
createMilestone
fun <T : Number> createMilestone(
condition: DataTypeCondition<T, AggregateDataType<T, *>>,
period: T
): ExerciseGoal<T>
Creates an ExerciseGoal that is achieved multiple times with its threshold being updated by a period value each time it is achieved. For instance, a milestone could be one for every 2km. This goal will there be triggered at distances = 2km, 4km, 6km, ...
createMilestoneGoalWithUpdatedThreshold
fun <T : Number> createMilestoneGoalWithUpdatedThreshold(
goal: ExerciseGoal<T>,
newThreshold: T
): ExerciseGoal<T>
Creates a new goal that is the same as a given goal but with a new threshold value.
createOneTimeGoal
fun <T : Number> createOneTimeGoal(
condition: DataTypeCondition<T, AggregateDataType<T, *>>
): ExerciseGoal<T>
Creates an ExerciseGoal that is achieved once when the given DataTypeCondition is satisfied.
Public companion properties
Public functions
Public properties
dataTypeCondition
val dataTypeCondition: DataTypeCondition<T, AggregateDataType<T, *>>
exerciseGoalType
val exerciseGoalType: ExerciseGoalType
The type of this exercise goal (ExerciseGoalType.ONE_TIME_GOAL or ExerciseGoalType.MILESTONE.)