ExerciseGoal.Companion

object ExerciseGoal.Companion


Summary

Public methods

final @NonNull ExerciseGoal

Creates an ExerciseGoal that is achieved multiple times with its threshold being updated by a period value each time it is achieved.

final @NonNull ExerciseGoal
createMilestoneGoalWithUpdatedThreshold(
    ExerciseGoal goal,
    Value newThreshold
)

Creates a new goal that is the same as a given goal but with a new threshold value.

final @NonNull ExerciseGoal

Creates an ExerciseGoal that is achieved once when the given DataTypeCondition is satisfied.

Public fields

Public methods

createMilestone

public final @NonNull ExerciseGoal createMilestone(DataTypeCondition condition, Value period)

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

public final @NonNull ExerciseGoal createMilestoneGoalWithUpdatedThreshold(
    ExerciseGoal goal,
    Value newThreshold
)

Creates a new goal that is the same as a given goal but with a new threshold value.

createOneTimeGoal

public final @NonNull ExerciseGoal createOneTimeGoal(DataTypeCondition condition)

Creates an ExerciseGoal that is achieved once when the given DataTypeCondition is satisfied.