Record Class NutritionPlanner.HydrationPlan
java.lang.Object
java.lang.Record
org.episteme.social.sports.NutritionPlanner.HydrationPlan
- All Implemented Interfaces:
Serializable
- Enclosing class:
NutritionPlanner
public static record NutritionPlanner.HydrationPlan(double dailyWaterLiters, double preworkoutMl, double duringWorkoutMlPerHour, double postWorkoutMl, boolean needsElectrolytes)
extends Record
implements Serializable
Guidelines for fluid intake.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHydrationPlan(double dailyWaterLiters, double preworkoutMl, double duringWorkoutMlPerHour, double postWorkoutMl, boolean needsElectrolytes) Creates an instance of aHydrationPlanrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedailyWaterLitersrecord component.doubleReturns the value of theduringWorkoutMlPerHourrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theneedsElectrolytesrecord component.doubleReturns the value of thepostWorkoutMlrecord component.doubleReturns the value of thepreworkoutMlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HydrationPlan
public HydrationPlan(double dailyWaterLiters, double preworkoutMl, double duringWorkoutMlPerHour, double postWorkoutMl, boolean needsElectrolytes) Creates an instance of aHydrationPlanrecord class.- Parameters:
dailyWaterLiters- the value for thedailyWaterLitersrecord componentpreworkoutMl- the value for thepreworkoutMlrecord componentduringWorkoutMlPerHour- the value for theduringWorkoutMlPerHourrecord componentpostWorkoutMl- the value for thepostWorkoutMlrecord componentneedsElectrolytes- the value for theneedsElectrolytesrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
dailyWaterLiters
public double dailyWaterLiters()Returns the value of thedailyWaterLitersrecord component.- Returns:
- the value of the
dailyWaterLitersrecord component
-
preworkoutMl
public double preworkoutMl()Returns the value of thepreworkoutMlrecord component.- Returns:
- the value of the
preworkoutMlrecord component
-
duringWorkoutMlPerHour
public double duringWorkoutMlPerHour()Returns the value of theduringWorkoutMlPerHourrecord component.- Returns:
- the value of the
duringWorkoutMlPerHourrecord component
-
postWorkoutMl
public double postWorkoutMl()Returns the value of thepostWorkoutMlrecord component.- Returns:
- the value of the
postWorkoutMlrecord component
-
needsElectrolytes
public boolean needsElectrolytes()Returns the value of theneedsElectrolytesrecord component.- Returns:
- the value of the
needsElectrolytesrecord component
-