Enum Class Metric
- All Implemented Interfaces:
Serializable,Comparable<Metric>,Constable
Enumeration representing the various performance metrics that can be used
to measure and track an athlete's activity within the SportTrack application.
Each constant carries a localized display value (in French) for rendering in the user interface. Metrics range from simple duration and repetition counts to computed values such as mean velocity and reps per minute.
- Author:
- SportTrack Team
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCounts the number of different days on which activities were performed.Measures the total distance covered during an activity.Measures the total elapsed time of an activity.Represents the average velocity maintained throughout an activity.Counts the number of repetitions performed during an activity.Represents the number of repetitions performed per minute, indicating pace. -
Method Summary
Modifier and TypeMethodDescriptionReturns the localized display label associated with this metric.static MetricReturns the enum constant of this class with the specified name.static Metric[]values()Returns an array containing the constants of this enum class, in the order they are declared.static Metric[]Returns all metrics except COUNT, suitable for challenge creation.
-
Enum Constant Details
-
DURATION
Measures the total elapsed time of an activity. -
REPETITION
Counts the number of repetitions performed during an activity. -
DISTANCE
Measures the total distance covered during an activity. -
MEAN_VELOCITY
Represents the average velocity maintained throughout an activity. -
REPS_PER_MINUTE
Represents the number of repetitions performed per minute, indicating pace. -
COUNT
Counts the number of different days on which activities were performed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getDisplayValue
Returns the localized display label associated with this metric.- Returns:
- the French display string for this metric
-
valuesForChallenges
Returns all metrics except COUNT, suitable for challenge creation. COUNT is excluded because it is intended only for badge verification.- Returns:
- an array of metrics excluding COUNT
-