Package akka.javasdk.decision
Record Class Answer.Score
- Record Components:
value- the position along the levels, counted from 0 for the lowest level. The value can fall between two levels.confidence- how peaked the distribution over the levels is, from 0 to 1probabilities- the probability per level, in the order of the levels
- All Implemented Interfaces:
Answer
- Enclosing interface:
Answer
public static record Answer.Score(double value, double confidence, List<Double> probabilities)
extends Record
implements Answer
The answer to a
Question.Score.-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.decision.Answer
Answer.Choice, Answer.Predicate, Answer.Score -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theconfidencerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theprobabilitiesrecord component.final StringtoString()Returns a string representation of this record class.doublevalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
Score
Creates an instance of aScorerecord class.- Parameters:
value- the value for thevaluerecord componentconfidence- the value for theconfidencerecord componentprobabilities- the value for theprobabilitiesrecord 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 '=='. -
value
public double value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
confidence
public double confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
probabilities
Returns the value of theprobabilitiesrecord component.- Returns:
- the value of the
probabilitiesrecord component
-