Enum HealthUnitDimension

java.lang.Object
java.lang.Enum<HealthUnitDimension>
com.codename1.health.HealthUnitDimension
All Implemented Interfaces:
Comparable<HealthUnitDimension>

public enum HealthUnitDimension extends Enum<HealthUnitDimension>
The physical dimension of a HealthUnit. Two units can be converted into one another exactly when they share a dimension; a conversion across dimensions is a programming error, not a runtime condition.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Dimensionless tallies -- steps, flights climbed, repetitions.
    Energy burned or consumed.
    Counts per unit time -- heart rate, respiratory rate, cadence.
    Glucose concentration only. Deliberately not a general CONCENTRATION dimension: converting mg/dL to mmol/L divides by the molar mass of the analyte (18.0182 for glucose), so a shared concentration dimension would silently produce wrong numbers the first time another analyte -- cholesterol, creatinine -- is added in mg/dL.
    Height, distance travelled, elevation.
    Body mass, lean mass, bone mass, food mass.
    Maximal oxygen uptake.
    Ratios expressed as a percentage -- oxygen saturation, body fat.
    Instantaneous mechanical power.
    Blood pressure.
    Body and basal temperature.
    Elapsed durations and inter-beat intervals.
    Movement speed.
    Liquid volume -- hydration.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • COUNT

      public static final HealthUnitDimension COUNT
      Dimensionless tallies -- steps, flights climbed, repetitions.
    • FREQUENCY

      public static final HealthUnitDimension FREQUENCY
      Counts per unit time -- heart rate, respiratory rate, cadence.
    • MASS

      public static final HealthUnitDimension MASS
      Body mass, lean mass, bone mass, food mass.
    • LENGTH

      public static final HealthUnitDimension LENGTH
      Height, distance travelled, elevation.
    • ENERGY

      public static final HealthUnitDimension ENERGY
      Energy burned or consumed.
    • TIME

      public static final HealthUnitDimension TIME
      Elapsed durations and inter-beat intervals.
    • PRESSURE

      public static final HealthUnitDimension PRESSURE
      Blood pressure.
    • TEMPERATURE

      public static final HealthUnitDimension TEMPERATURE
      Body and basal temperature.
    • VOLUME

      public static final HealthUnitDimension VOLUME
      Liquid volume -- hydration.
    • POWER

      public static final HealthUnitDimension POWER
      Instantaneous mechanical power.
    • VELOCITY

      public static final HealthUnitDimension VELOCITY
      Movement speed.
    • OXYGEN_UPTAKE

      public static final HealthUnitDimension OXYGEN_UPTAKE
      Maximal oxygen uptake.
    • PERCENT

      public static final HealthUnitDimension PERCENT
      Ratios expressed as a percentage -- oxygen saturation, body fat.
    • GLUCOSE_CONCENTRATION

      public static final HealthUnitDimension GLUCOSE_CONCENTRATION
      Glucose concentration only. Deliberately not a general CONCENTRATION dimension: converting mg/dL to mmol/L divides by the molar mass of the analyte (18.0182 for glucose), so a shared concentration dimension would silently produce wrong numbers the first time another analyte -- cholesterol, creatinine -- is added in mg/dL. If such a type is ever introduced it must get its own dimension rather than reuse this one.
  • Method Details

    • values

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