Record Class NutritionPlanner.AthleteProfile

java.lang.Object
java.lang.Record
org.episteme.social.sports.NutritionPlanner.AthleteProfile
All Implemented Interfaces:
Serializable
Enclosing class:
NutritionPlanner

public static record NutritionPlanner.AthleteProfile(double massKg, double heightCm, int age, boolean isMale, String sport, NutritionPlanner.ActivityLevel activityLevel, NutritionPlanner.TrainingPhase phase) extends Record implements Serializable
Physiological data for an athlete.
See Also:
  • Constructor Details

    • AthleteProfile

      public AthleteProfile(double massKg, double heightCm, int age, boolean isMale, String sport, NutritionPlanner.ActivityLevel activityLevel, NutritionPlanner.TrainingPhase phase)
      Creates an instance of a AthleteProfile record class.
      Parameters:
      massKg - the value for the massKg record component
      heightCm - the value for the heightCm record component
      age - the value for the age record component
      isMale - the value for the isMale record component
      sport - the value for the sport record component
      activityLevel - the value for the activityLevel record component
      phase - the value for the phase record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • massKg

      public double massKg()
      Returns the value of the massKg record component.
      Returns:
      the value of the massKg record component
    • heightCm

      public double heightCm()
      Returns the value of the heightCm record component.
      Returns:
      the value of the heightCm record component
    • age

      public int age()
      Returns the value of the age record component.
      Returns:
      the value of the age record component
    • isMale

      public boolean isMale()
      Returns the value of the isMale record component.
      Returns:
      the value of the isMale record component
    • sport

      public String sport()
      Returns the value of the sport record component.
      Returns:
      the value of the sport record component
    • activityLevel

      public NutritionPlanner.ActivityLevel activityLevel()
      Returns the value of the activityLevel record component.
      Returns:
      the value of the activityLevel record component
    • phase

      Returns the value of the phase record component.
      Returns:
      the value of the phase record component