Record Class QuestionMatcher.ScoredQuestion
java.lang.Object
java.lang.Record
org.ek9lang.assist.QuestionMatcher.ScoredQuestion
- Enclosing class:
QuestionMatcher
public static record QuestionMatcher.ScoredQuestion(QuestionAndAnswer question, int score)
extends Record
A question paired with its match score. Lower score means better match.
-
Constructor Summary
ConstructorsConstructorDescriptionScoredQuestion(QuestionAndAnswer question, int score) Creates an instance of aScoredQuestionrecord 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.question()Returns the value of thequestionrecord component.intscore()Returns the value of thescorerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScoredQuestion
Creates an instance of aScoredQuestionrecord class.- Parameters:
question- the value for thequestionrecord 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. -
question
Returns the value of thequestionrecord component.- Returns:
- the value of the
questionrecord component
-
score
public int score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-