Package com.pocketcombats.openskill.data
Record Class SimpleTeamResult<T>
java.lang.Object
java.lang.Record
com.pocketcombats.openskill.data.SimpleTeamResult<T>
- All Implemented Interfaces:
MatchMakingRating,TeamResult<T>,Serializable
public record SimpleTeamResult<T>(double mu, double sigma, int rank, double weight, Collection<? extends PlayerResult<T>> players)
extends Record
implements TeamResult<T>, Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleTeamResult(double mu, double sigma, int rank, double weight, Collection<? extends PlayerResult<T>> players) Creates an instance of aSimpleTeamResultrecord class.SimpleTeamResult(double mu, double sigma, int rank, Collection<? extends PlayerResult<T>> players) -
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.doublemu()Returns the value of themurecord component.Collection<? extends PlayerResult<T>> players()Returns the value of theplayersrecord component.intrank()Returns the value of therankrecord 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
-
SimpleTeamResult
public SimpleTeamResult(double mu, double sigma, int rank, Collection<? extends PlayerResult<T>> players) -
SimpleTeamResult
public SimpleTeamResult(double mu, double sigma, int rank, double weight, Collection<? extends PlayerResult<T>> players) Creates an instance of aSimpleTeamResultrecord class.- Parameters:
mu- the value for themurecord componentsigma- the value for thesigmarecord componentrank- the value for therankrecord componentweight- the value for theweightrecord componentplayers- the value for theplayersrecord 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 '=='. -
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
-
rank
public int rank()Returns the value of therankrecord component.- Specified by:
rankin interfaceTeamResult<T>- Returns:
- the value of the
rankrecord component
-
weight
public double weight()Returns the value of theweightrecord component.- Specified by:
weightin interfaceTeamResult<T>- Returns:
- the value of the
weightrecord component
-
players
Returns the value of theplayersrecord component.- Specified by:
playersin interfaceTeamResult<T>- Returns:
- the value of the
playersrecord component
-