Enum Class Metric

java.lang.Object
java.lang.Enum<Metric>
fr.utc.miage.sporttrack.entity.enumeration.Metric
All Implemented Interfaces:
Serializable, Comparable<Metric>, Constable

public enum Metric extends Enum<Metric>
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
  • Enum Constant Details

    • DURATION

      public static final Metric DURATION
      Measures the total elapsed time of an activity.
    • REPETITION

      public static final Metric REPETITION
      Counts the number of repetitions performed during an activity.
    • DISTANCE

      public static final Metric DISTANCE
      Measures the total distance covered during an activity.
    • MEAN_VELOCITY

      public static final Metric MEAN_VELOCITY
      Represents the average velocity maintained throughout an activity.
    • REPS_PER_MINUTE

      public static final Metric REPS_PER_MINUTE
      Represents the number of repetitions performed per minute, indicating pace.
    • COUNT

      public static final Metric COUNT
      Counts the number of different days on which activities were performed.
  • Method Details

    • values

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

      public static Metric valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getDisplayValue

      public String getDisplayValue()
      Returns the localized display label associated with this metric.
      Returns:
      the French display string for this metric
    • valuesForChallenges

      public static 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