# Enum HealthAggregationStyle

java.lang.Object
java.lang.Enum<HealthAggregationStyle>
com.codename1.health.HealthAggregationStyle

All Implemented Interfaces:
  `Comparable<HealthAggregationStyle>`

public enum HealthAggregationStyle extends Enum<HealthAggregationStyle>
How a `HealthDataType` combines over a time bucket. Determines which `AggregateMetric` values are meaningful for the type.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `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
  `NONE`
  The type does not aggregate numerically at all -- sleep sessions, workouts, category observations.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static HealthAggregationStyle`
  `valueOf(String name)`
  Returns 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`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### CUMULATIVE

    public static final HealthAggregationStyle CUMULATIVE

    Values 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

    public static final HealthAggregationStyle DISCRETE
    Values 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

    public static final HealthAggregationStyle NONE
    The 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()
    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

    public static HealthAggregationStyle valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null