Package xyz.tcheeric.jev
Record Class Answer.Choice
java.lang.Object
java.lang.Record
xyz.tcheeric.jev.Answer.Choice
- Record Components:
distribution- every option the question offered, mapped to its probability, in the order the evaluator sent them. That is not always the order they were asked in, so look options up by name rather than by position.chosen- the option the evaluator ranked highest
- All Implemented Interfaces:
Answer
- Enclosing interface:
Answer
-
Nested Class Summary
Nested classes/interfaces inherited from interface xyz.tcheeric.jev.Answer
Answer.Choice, Answer.Noul, Answer.Score -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchosen()Returns the value of thechosenrecord component.doubleReturns the value of theconfidencerecord component.Returns the value of thedistributionrecord 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Choice
Creates an instance of aChoicerecord class.- Parameters:
name- the value for thenamerecord componentdistribution- the value for thedistributionrecord componentchosen- the value for thechosenrecord componentconfidence- the value for theconfidencerecord 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 '=='. -
name
Returns the value of thenamerecord component. -
distribution
Returns the value of thedistributionrecord component.- Returns:
- the value of the
distributionrecord component
-
chosen
Returns the value of thechosenrecord component.- Returns:
- the value of the
chosenrecord component
-
confidence
public double confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-