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>

Creates a DebouncedGoal that is achieved once when given DebouncedDataTypeCondition is satisfied for the AggregateDataType.

static final @NonNull DebouncedGoal<@NonNull T>

Creates a DebouncedGoal that is achieved once when given DebouncedDataTypeCondition is satisfied for the DeltaDataType.

boolean
equals(Object other)
final @NonNull DebouncedDataTypeCondition<@NonNull T, @NonNull ?>

The condition which specifies data type, threshold, comparison type and debounced params.

int
@NonNull String

Public methods

createAggregateDebouncedGoal

Added in 1.1.0-alpha04
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

Added in 1.1.0-alpha04
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

equals

public boolean equals(Object other)

getDebouncedDataTypeCondition

Added in 1.1.0-alpha04
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.

hashCode

public int hashCode()

toString

public @NonNull String toString()