DebouncedGoal
public final class DebouncedGoal<T extends Number>
Defines a debounced goal for an exercise. Debounced means, the goal will be triggered only after the threshold has been crossed for a specified duration of time, e.g. initialDelay and durationAtThreshold. Only applies to sample data types(e.g. heart rate, speed) and aggregate data type with statistical data points(e.g. pace stats).
Summary
Public methods |
|
|---|---|
static final @NonNull DebouncedGoal<@NonNull T> |
<T extends Number> createAggregateDebouncedGoal(Creates a |
static final @NonNull DebouncedGoal<@NonNull T> |
<T extends Number> createSampleDebouncedGoal(Creates a |
boolean |
|
final @NonNull DebouncedDataTypeCondition<@NonNull T, @NonNull ?> |
The condition which specifies data type, threshold, comparison type and debounced params. |
int |
hashCode() |
@NonNull String |
toString() |
Public methods
createAggregateDebouncedGoal
public static final @NonNull DebouncedGoal<@NonNull T> <T extends Number> createAggregateDebouncedGoal(
@NonNull DebouncedDataTypeCondition<@NonNull T, @NonNull AggregateDataType<@NonNull T, @NonNull StatisticalDataPoint<@NonNull T>>> condition
)
Creates a DebouncedGoal that is achieved once when given DebouncedDataTypeCondition is satisfied for the AggregateDataType.
| Parameters | |
|---|---|
@NonNull DebouncedDataTypeCondition<@NonNull T, @NonNull AggregateDataType<@NonNull T, @NonNull StatisticalDataPoint<@NonNull T>>> condition |
the debounced data type condition for an aggregate data type, and whose value represents an average value, e.g. average heart rate |
| Returns | |
|---|---|
@NonNull DebouncedGoal<@NonNull T> |
a debounced goal that is triggered when the condition is met |
createSampleDebouncedGoal
public static final @NonNull DebouncedGoal<@NonNull T> <T extends Number> createSampleDebouncedGoal(
@NonNull DebouncedDataTypeCondition<@NonNull T, @NonNull DeltaDataType<@NonNull T, @NonNull SampleDataPoint<@NonNull T>>> condition
)
Creates a DebouncedGoal that is achieved once when given DebouncedDataTypeCondition is satisfied for the DeltaDataType.
| Parameters | |
|---|---|
@NonNull DebouncedDataTypeCondition<@NonNull T, @NonNull DeltaDataType<@NonNull T, @NonNull SampleDataPoint<@NonNull T>>> condition |
the debounced data type condition for a sample data type, and whose value represents an instantaneous value, e.g. instantaneous heart rate |
| Returns | |
|---|---|
@NonNull DebouncedGoal<@NonNull T> |
a debounced goal that is triggered when the condition is met |
getDebouncedDataTypeCondition
public final @NonNull DebouncedDataTypeCondition<@NonNull T, @NonNull ?> getDebouncedDataTypeCondition()
The condition which specifies data type, threshold, comparison type and debounced params. The condition must be met in order to trigger the goal.