Package com.microej.wear.services
Enum HealthService.HealthMetric
- java.lang.Object
-
- java.lang.Enum<HealthService.HealthMetric>
-
- com.microej.wear.services.HealthService.HealthMetric
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<HealthService.HealthMetric>
- Enclosing interface:
- HealthService
public static enum HealthService.HealthMetric extends java.lang.Enum<HealthService.HealthMetric>
Represents the different types of health metrics.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CALORIESThe calories burned since the start of day, in kcal.HEART_RATEThe heart rate, in bpm.STEPSThe number of steps since the start of day.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HealthService.HealthMetricvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static HealthService.HealthMetric[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HEART_RATE
public static final HealthService.HealthMetric HEART_RATE
The heart rate, in bpm.
-
STEPS
public static final HealthService.HealthMetric STEPS
The number of steps since the start of day.
-
CALORIES
public static final HealthService.HealthMetric CALORIES
The calories burned since the start of day, in kcal.
-
-
Method Detail
-
values
public static HealthService.HealthMetric[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HealthService.HealthMetric c : HealthService.HealthMetric.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HealthService.HealthMetric valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-