Record Class AffinityEngine.Ranked<K>
java.lang.Object
java.lang.Record
ke.ric.api.affinity.AffinityEngine.Ranked<K>
- Enclosing class:
AffinityEngine<K>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecandidaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublescore()Returns the value of thescorerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Ranked
Creates an instance of aRankedrecord class.- Parameters:
candidate- the value for thecandidaterecord componentscore- the value for thescorerecord 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. -
candidate
Returns the value of thecandidaterecord component.- Returns:
- the value of the
candidaterecord component
-
score
public double score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-