Record Class DraftSimulator.Prospect
java.lang.Object
java.lang.Record
org.episteme.social.sports.DraftSimulator.Prospect
- All Implemented Interfaces:
Serializable
- Enclosing class:
DraftSimulator
public static record DraftSimulator.Prospect(String name, String position, double overallRating, double potential, int age, Map<String,Double> attributes)
extends Record
implements Serializable
Data model for a draft prospect.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintage()Returns the value of theagerecord component.Returns the value of theattributesrecord component.final 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.doubleReturns the value of theoverallRatingrecord component.position()Returns the value of thepositionrecord component.doubleReturns the value of thepotentialrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Prospect
public Prospect(String name, String position, double overallRating, double potential, int age, Map<String, Double> attributes) Creates an instance of aProspectrecord class.- Parameters:
name- the value for thenamerecord componentposition- the value for thepositionrecord componentoverallRating- the value for theoverallRatingrecord componentpotential- the value for thepotentialrecord componentage- the value for theagerecord componentattributes- the value for theattributesrecord 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
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
overallRating
public double overallRating()Returns the value of theoverallRatingrecord component.- Returns:
- the value of the
overallRatingrecord component
-
potential
public double potential()Returns the value of thepotentialrecord component.- Returns:
- the value of the
potentialrecord component
-
age
public int age()Returns the value of theagerecord component.- Returns:
- the value of the
agerecord component
-
attributes
-