Package akka.javasdk.decision
Record Class Answer.Choice
- Record Components:
selected- the key of the option with the highest probabilityconfidence- how peaked the distribution over the options is, from 0 to 1probabilities- the probability per option key
- All Implemented Interfaces:
Answer
- Enclosing interface:
Answer
public static record Answer.Choice(String selected, double confidence, Map<String,Double> probabilities)
extends Record
implements Answer
The answer to a
Question.Choice.-
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.selected()Returns the value of theselectedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Choice
Creates an instance of aChoicerecord class.- Parameters:
selected- the value for theselectedrecord 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 '=='. -
selected
Returns the value of theselectedrecord component.- Returns:
- the value of the
selectedrecord 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
-