ExerciseGoal


class ExerciseGoalNumber> : Parcelable

Defines a goal for an exercise.

Summary

Public companion functions

ExerciseGoal
Number> createMilestone(
    condition: DataTypeConditionAggregateDataType>,
    period: T
)

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

ExerciseGoal
Number> createMilestoneGoalWithUpdatedThreshold(
    goal: ExerciseGoal,
    newThreshold: T
)

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

ExerciseGoal
Number> createOneTimeGoal(
    condition: DataTypeConditionAggregateDataType>
)

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

Public companion properties

Parcelable.Creator<ExerciseGoal<*>>

Public functions

open Int
open operator Boolean
equals(other: Any?)
open Int
open String
open Unit
writeToParcel(dest: Parcel, flags: Int)

Public companion functions

createMilestone

Added in 1.0.0
fun Number> createMilestone(
    condition: DataTypeConditionAggregateDataType>,
    period: T
): ExerciseGoal

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

Added in 1.0.0
fun Number> createMilestoneGoalWithUpdatedThreshold(
    goal: ExerciseGoal,
    newThreshold: T
): ExerciseGoal

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

createOneTimeGoal

Added in 1.0.0
fun Number> createOneTimeGoal(
    condition: DataTypeConditionAggregateDataType>
): ExerciseGoal

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

Public companion properties

Public functions

describeContents

Added in 1.0.0
open fun describeContents(): Int

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

writeToParcel

Added in 1.0.0
open fun writeToParcel(dest: Parcel, flags: Int): Unit

Public properties

dataTypeCondition

Added in 1.0.0
val dataTypeConditionDataTypeConditionAggregateDataType>

exerciseGoalType

Added in 1.0.0
val exerciseGoalTypeExerciseGoalType

The type of this exercise goal (ExerciseGoalType.ONE_TIME_GOAL or ExerciseGoalType.MILESTONE.)

period

Added in 1.0.0
val period: T?