Record Class InjuryPredictor.AthleteProfile

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

public static record InjuryPredictor.AthleteProfile(int age, double bodyMass, double previousInjuries, double sleepQuality, double nutritionScore, double muscleBalance, String sport) extends Record implements Serializable
Physiological and historical profile of an athlete.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    AthleteProfile(int age, double bodyMass, double previousInjuries, double sleepQuality, double nutritionScore, double muscleBalance, String sport)
    Creates an instance of a AthleteProfile record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    age()
    Returns the value of the age record component.
    double
    Returns the value of the bodyMass record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the muscleBalance record component.
    double
    Returns the value of the nutritionScore record component.
    double
    Returns the value of the previousInjuries record component.
    double
    Returns the value of the sleepQuality record component.
    Returns the value of the sport record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AthleteProfile

      public AthleteProfile(int age, double bodyMass, double previousInjuries, double sleepQuality, double nutritionScore, double muscleBalance, String sport)
      Creates an instance of a AthleteProfile record class.
      Parameters:
      age - the value for the age record component
      bodyMass - the value for the bodyMass record component
      previousInjuries - the value for the previousInjuries record component
      sleepQuality - the value for the sleepQuality record component
      nutritionScore - the value for the nutritionScore record component
      muscleBalance - the value for the muscleBalance record component
      sport - the value for the sport 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.
    • age

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

      public double bodyMass()
      Returns the value of the bodyMass record component.
      Returns:
      the value of the bodyMass record component
    • previousInjuries

      public double previousInjuries()
      Returns the value of the previousInjuries record component.
      Returns:
      the value of the previousInjuries record component
    • sleepQuality

      public double sleepQuality()
      Returns the value of the sleepQuality record component.
      Returns:
      the value of the sleepQuality record component
    • nutritionScore

      public double nutritionScore()
      Returns the value of the nutritionScore record component.
      Returns:
      the value of the nutritionScore record component
    • muscleBalance

      public double muscleBalance()
      Returns the value of the muscleBalance record component.
      Returns:
      the value of the muscleBalance record component
    • sport

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