Enum MetricController.Metric
- java.lang.Object
-
- java.lang.Enum<MetricController.Metric>
-
- bytemusketeers.heslingtonhustle.metrics.MetricController.Metric
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MetricController.Metric>
- Enclosing class:
- MetricController
public static enum MetricController.Metric extends java.lang.Enum<MetricController.Metric>
Distinguish between the standard metrics represented in theMetricEntry
objects
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
displayName
A human-readable name for theMetricController.Metric
ordinal
-
Constructor Summary
Constructors Modifier Constructor Description private
Metric(java.lang.String displayName)
Instantiates a new standardMetricController.Metric
template
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
Retrieves the human-readableMetricController.Metric
display namestatic MetricController.Metric
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MetricController.Metric[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Sleep
public static final MetricController.Metric Sleep
-
Study
public static final MetricController.Metric Study
-
Eat
public static final MetricController.Metric Eat
-
Play
public static final MetricController.Metric Play
-
Area
public static final MetricController.Metric Area
-
Day
public static final MetricController.Metric Day
-
-
Field Detail
-
displayName
private final java.lang.String displayName
A human-readable name for theMetricController.Metric
ordinal
-
-
Constructor Detail
-
Metric
private Metric(java.lang.String displayName)
Instantiates a new standardMetricController.Metric
template- Parameters:
displayName
- The human-readable name of the newMetricController.Metric
-
-
Method Detail
-
values
public static MetricController.Metric[] 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 (MetricController.Metric c : MetricController.Metric.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MetricController.Metric 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
-
toString
public java.lang.String toString()
Retrieves the human-readableMetricController.Metric
display name- Overrides:
toString
in classjava.lang.Enum<MetricController.Metric>
- Returns:
- The name for the requested
MetricController.Metric
-
-