Record Class RecommendationService.RecommendationResult
java.lang.Object
java.lang.Record
com.serinity.exercicecontrol.service.RecommendationService.RecommendationResult
- Enclosing class:
RecommendationService
public static record RecommendationService.RecommendationResult(Exercise exercise, String reason, int targetMinutes, ActionPlan actionPlan)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionRecommendationResult(Exercise exercise, String reason, int targetMinutes, ActionPlan actionPlan) Creates an instance of aRecommendationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionPlanrecord component.final booleanIndicates whether some other object is "equal to" this one.exercise()Returns the value of theexerciserecord component.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.intReturns the value of thetargetMinutesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecommendationResult
public RecommendationResult(Exercise exercise, String reason, int targetMinutes, ActionPlan actionPlan) Creates an instance of aRecommendationResultrecord class.- Parameters:
exercise- the value for theexerciserecord componentreason- the value for thereasonrecord componenttargetMinutes- the value for thetargetMinutesrecord componentactionPlan- the value for theactionPlanrecord 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. -
exercise
Returns the value of theexerciserecord component.- Returns:
- the value of the
exerciserecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
targetMinutes
public int targetMinutes()Returns the value of thetargetMinutesrecord component.- Returns:
- the value of the
targetMinutesrecord component
-
actionPlan
Returns the value of theactionPlanrecord component.- Returns:
- the value of the
actionPlanrecord component
-