Package com.pocketcombats.openskill.data
Record Class SimplePlayerResult<T>
java.lang.Object
java.lang.Record
com.pocketcombats.openskill.data.SimplePlayerResult<T>
- All Implemented Interfaces:
MatchMakingRating,PlayerResult<T>,Serializable
public record SimplePlayerResult<T>(T id, double mu, double sigma, double weight)
extends Record
implements PlayerResult<T>, Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePlayerResult(T id, double mu, double sigma) SimplePlayerResult(T id, double mu, double sigma, double weight) Creates an instance of aSimplePlayerResultrecord class. -
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.id()Returns the value of theidrecord component.doublemu()Returns the value of themurecord component.doublesigma()Returns the value of thesigmarecord component.final StringtoString()Returns a string representation of this record class.doubleweight()Returns the value of theweightrecord component.
-
Constructor Details
-
SimplePlayerResult
-
SimplePlayerResult
Creates an instance of aSimplePlayerResultrecord class.- Parameters:
id- the value for theidrecord componentmu- the value for themurecord componentsigma- the value for thesigmarecord componentweight- the value for theweightrecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
id
Returns the value of theidrecord component.- Specified by:
idin interfacePlayerResult<T>- Returns:
- the value of the
idrecord component
-
mu
public double mu()Returns the value of themurecord component.- Specified by:
muin interfaceMatchMakingRating- Returns:
- the value of the
murecord component
-
sigma
public double sigma()Returns the value of thesigmarecord component.- Specified by:
sigmain interfaceMatchMakingRating- Returns:
- the value of the
sigmarecord component
-
weight
public double weight()Returns the value of theweightrecord component.- Specified by:
weightin interfacePlayerResult<T>- Returns:
- the value of the
weightrecord component
-