class DebouncedGoal<T : 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 companion functions

DebouncedGoal<T>

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

DebouncedGoal<T>

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

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

DebouncedDataTypeCondition<T, *>

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

Public companion functions

createAggregateDebouncedGoal

Added in 1.1.0-alpha05
fun <T : Number> createAggregateDebouncedGoal(
    condition: DebouncedDataTypeCondition<T, AggregateDataType<T, StatisticalDataPoint<T>>>
): DebouncedGoal<T>

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

Parameters
condition: DebouncedDataTypeCondition<T, AggregateDataType<T, StatisticalDataPoint<T>>>

the debounced data type condition for an aggregate data type, and whose value represents an average value, e.g. average heart rate

Returns
DebouncedGoal<T>

a debounced goal that is triggered when the condition is met

createSampleDebouncedGoal

Added in 1.1.0-alpha05
fun <T : Number> createSampleDebouncedGoal(
    condition: DebouncedDataTypeCondition<T, DeltaDataType<T, SampleDataPoint<T>>>
): DebouncedGoal<T>

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

Parameters
condition: DebouncedDataTypeCondition<T, DeltaDataType<T, SampleDataPoint<T>>>

the debounced data type condition for a sample data type, and whose value represents an instantaneous value, e.g. instantaneous heart rate

Returns
DebouncedGoal<T>

a debounced goal that is triggered when the condition is met

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

debouncedDataTypeCondition

Added in 1.1.0-alpha05
val debouncedDataTypeConditionDebouncedDataTypeCondition<T, *>

The condition which specifies data type, threshold, comparison type and debounced params. The condition must be met in order to trigger the goal.