# Enum HealthDataKind

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

All Implemented Interfaces:
  `Comparable<HealthDataKind>`

public enum HealthDataKind extends Enum<HealthDataKind>
What shape of data a `HealthDataType` produces, and therefore which `HealthSample` subclass a query for it returns.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `CATEGORY`
  An enumerated observation with no natural unit -- menstrual flow, a single sleep stage.
  `QUANTITY`
  A numeric measurement with a unit -- steps, heart rate, body mass.
  `SERIES`
  A run of measurements sharing one record identity -- a beat-to-beat heart-rate trace.
  `SESSION`
  A bounded activity with child data -- a workout, a night's sleep.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static HealthDataKind`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static HealthDataKind[]`
  `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

  - ### QUANTITY

    public static final HealthDataKind QUANTITY
    A numeric measurement with a unit -- steps, heart rate, body mass. Produces `QuantitySample`. Maps to `HKQuantitySample` and to Health Connect's numeric record types.

  - ### CATEGORY

    public static final HealthDataKind CATEGORY
    An enumerated observation with no natural unit -- menstrual flow, a single sleep stage. Produces `CategorySample`. Maps to `HKCategorySample`.

  - ### SERIES

    public static final HealthDataKind SERIES

    A run of measurements sharing one record identity -- a beat-to-beat heart-rate trace. Produces `SeriesSample`.

    This kind exists because the two platforms disagree: Health Connect's `HeartRateRecord` is one record containing N samples, while HealthKit returns N independent samples. See `SampleQuery.setFlattenSeries(boolean)`.

  - ### SESSION

    public static final HealthDataKind SESSION
    A bounded activity with child data -- a workout, a night's sleep. Produces a `SessionSample` subclass.

- ## Method Details

  - ### values

    public static HealthDataKind[] 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 HealthDataKind 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