Enum Class AthleteGender

java.lang.Object
java.lang.Enum<AthleteGender>
com.endurancetrio.data.competitor.model.enumerator.AthleteGender
All Implemented Interfaces:
Serializable, Comparable<AthleteGender>, Constable

public enum AthleteGender extends Enum<AthleteGender>
The AthleteGender enum represents the gender of an Athlete.

It includes the following constants:

  • MALE : used for male athletes.
  • FEMALE : used for female athletes.
  • Enum Constant Details

  • Method Details

    • values

      public static AthleteGender[] 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 AthleteGender 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
    • getCode

      public String getCode()
      Returns the full code of the gender (e.g., "MALE", "FEMALE").

      This value is used for persistence and API interchange.

      Returns:
      the full gender code
    • getShortCode

      public String getShortCode()
      Returns the short code of the gender (e.g., "M", "F").

      This value is intended for compact display in UI tables, result sheets, and scoreboards.

      Returns:
      the short gender code
    • toString

      public String toString()
      Overrides:
      toString in class Enum<AthleteGender>