public enum HealthAggregationStyle
- Object
- Enum<HealthAggregationStyle>
- HealthAggregationStyle
ImplementsComparable<HealthAggregationStyle>
How a
HealthDataType combines over a time bucket. Determines which
AggregateMetric values are meaningful for the type.Enum constants
CUMULATIVE | Values accumulate over an interval and are summed – steps, distance, energy burned. |
DISCRETE | Values are point-in-time observations that are averaged or reduced – heart rate, body mass, blood glucose. |
NONE | The type does not aggregate numerically at all – sleep sessions, workouts, category observations. |
Methods
public static HealthAggregationStyle[] values() | |
public static HealthAggregationStyle valueOf(String name) |
Inherited methods
Enum constant details
CUMULATIVE
CUMULATIVEValues accumulate over an interval and are summed – steps,
distance, energy burned. AggregateMetric.TOTAL is meaningful;
averaging raw samples is not.
Cumulative types are always interval samples: a step count belongs
to a span of time, never to an instant. See
HealthDataType.isIntervalOnly().
DISCRETE
DISCRETEValues are point-in-time observations that are averaged or reduced
– heart rate, body mass, blood glucose.
AggregateMetric.AVERAGE,
AggregateMetric.MINIMUM, AggregateMetric.MAXIMUM and
AggregateMetric.LATEST are meaningful; totalling them is not.NONE
NONEThe type does not aggregate numerically at all – sleep sessions,
workouts, category observations. Only
AggregateMetric.COUNT and
AggregateMetric.DURATION apply.Method details
values
public static HealthAggregationStyle[] values()valueOf
public static HealthAggregationStyle valueOf(String name)