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 Summary
ConstructorsConstructorDescriptionAthleteProfile(double massKg, double heightCm, int age, boolean isMale, String sport, NutritionPlanner.ActivityLevel activityLevel, NutritionPlanner.TrainingPhase phase) Creates an instance of aAthleteProfilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactivityLevelrecord component.intage()Returns the value of theagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheightCm()Returns the value of theheightCmrecord component.booleanisMale()Returns the value of theisMalerecord component.doublemassKg()Returns the value of themassKgrecord component.phase()Returns the value of thephaserecord component.sport()Returns the value of thesportrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aAthleteProfilerecord class.- Parameters:
massKg- the value for themassKgrecord componentheightCm- the value for theheightCmrecord componentage- the value for theagerecord componentisMale- the value for theisMalerecord componentsport- the value for thesportrecord componentactivityLevel- the value for theactivityLevelrecord componentphase- the value for thephaserecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
massKg
public double massKg()Returns the value of themassKgrecord component.- Returns:
- the value of the
massKgrecord component
-
heightCm
public double heightCm()Returns the value of theheightCmrecord component.- Returns:
- the value of the
heightCmrecord component
-
age
public int age()Returns the value of theagerecord component.- Returns:
- the value of the
agerecord component
-
isMale
public boolean isMale()Returns the value of theisMalerecord component.- Returns:
- the value of the
isMalerecord component
-
sport
Returns the value of thesportrecord component.- Returns:
- the value of the
sportrecord component
-
activityLevel
Returns the value of theactivityLevelrecord component.- Returns:
- the value of the
activityLevelrecord component
-
phase
Returns the value of thephaserecord component.- Returns:
- the value of the
phaserecord component
-