Record Class SalaryCapOptimizer.Player
java.lang.Object
java.lang.Record
org.episteme.social.sports.SalaryCapOptimizer.Player
- All Implemented Interfaces:
Serializable
- Enclosing class:
SalaryCapOptimizer
public static record SalaryCapOptimizer.Player(String name, double rating, double salary)
extends Record
implements Serializable
Data model for a player's performance and salary.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.doublerating()Returns the value of theratingrecord component.doublesalary()Returns the value of thesalaryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Player
Creates an instance of aPlayerrecord class.- Parameters:
name- the value for thenamerecord componentrating- the value for theratingrecord componentsalary- the value for thesalaryrecord 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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
rating
public double rating()Returns the value of theratingrecord component.- Returns:
- the value of the
ratingrecord component
-
salary
public double salary()Returns the value of thesalaryrecord component.- Returns:
- the value of the
salaryrecord component
-