ExerciseGoal
public final class ExerciseGoal<T extends Number> implements Parcelable
Defines a goal for an exercise.
Summary
Public fields |
|
|---|---|
static final @NonNull Parcelable.Creator<@NonNull ExerciseGoal<@NonNull ?>> |
Public methods |
|
|---|---|
static final @NonNull ExerciseGoal<@NonNull T> |
<T extends Number> createMilestone(Creates an |
static final @NonNull ExerciseGoal<@NonNull T> |
<T extends Number> createMilestoneGoalWithUpdatedThreshold(Creates a new goal that is the same as a given goal but with a new threshold value. |
static final @NonNull ExerciseGoal<@NonNull T> |
<T extends Number> createOneTimeGoal(Creates an |
int |
|
boolean |
|
final @NonNull DataTypeCondition<@NonNull T, @NonNull AggregateDataType<@NonNull T, @NonNull ?>> |
|
final @NonNull ExerciseGoalType |
The type of this exercise goal ( |
final T |
|
int |
hashCode() |
@NonNull String |
toString() |
void |
writeToParcel(@NonNull Parcel dest, int flags) |
Public fields
Public methods
createMilestone
public static final @NonNull ExerciseGoal<@NonNull T> <T extends Number> createMilestone(
@NonNull DataTypeCondition<@NonNull T, @NonNull AggregateDataType<@NonNull T, @NonNull ?>> condition,
@NonNull T 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 static final @NonNull ExerciseGoal<@NonNull T> <T extends Number> createMilestoneGoalWithUpdatedThreshold(
@NonNull ExerciseGoal<@NonNull T> goal,
@NonNull T newThreshold
)
Creates a new goal that is the same as a given goal but with a new threshold value.
createOneTimeGoal
public static final @NonNull ExerciseGoal<@NonNull T> <T extends Number> createOneTimeGoal(
@NonNull DataTypeCondition<@NonNull T, @NonNull AggregateDataType<@NonNull T, @NonNull ?>> condition
)
Creates an ExerciseGoal that is achieved once when the given DataTypeCondition is satisfied.
getDataTypeCondition
public final @NonNull DataTypeCondition<@NonNull T, @NonNull AggregateDataType<@NonNull T, @NonNull ?>> getDataTypeCondition()
getExerciseGoalType
public final @NonNull ExerciseGoalType getExerciseGoalType()
The type of this exercise goal (ExerciseGoalType.ONE_TIME_GOAL or ExerciseGoalType.MILESTONE.)