Enum HealthAggregationStyle
- All Implemented Interfaces:
Comparable<HealthAggregationStyle>
How a
HealthDataType combines over a time bucket. Determines which
AggregateMetric values are meaningful for the type.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionValues accumulate over an interval and are summed -- steps, distance, energy burned.Values are point-in-time observations that are averaged or reducedThe type does not aggregate numerically at all -- sleep sessions, workouts, category observations. -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthAggregationStyleReturns the enum constant of this type with the specified name.static HealthAggregationStyle[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
CUMULATIVE
Values accumulate over an interval and are summed -- steps, distance, energy burned.
AggregateMetric.TOTALis 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
Values are point-in-time observations that are averaged or reduced -- heart rate, body mass, blood glucose.AggregateMetric.AVERAGE,AggregateMetric.MINIMUM,AggregateMetric.MAXIMUMandAggregateMetric.LATESTare meaningful; totalling them is not. -
NONE
The type does not aggregate numerically at all -- sleep sessions, workouts, category observations. OnlyAggregateMetric.COUNTandAggregateMetric.DURATIONapply.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-