Package akka.javasdk.decision
Record Class Decision
- Record Components:
model- the model version that answered. Log it with the answers, because the thresholds you compare answers against depend on the model version.answers- the answer per question key
The answers of a decision model to the questions of one request, see
DecisionModelClient.
Read each answer with answer(Question). A decision can be stored in component state and
returned from endpoints, the JSON representation round-trips.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<A extends Answer>
AThe answer to the given question.answers()Returns the value of theanswersrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
answer
The answer to the given question.- Throws:
IllegalArgumentException- when there is no answer for the key of the question, or the answer does not match the type, options or levels of the question
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
answers
Returns the value of theanswersrecord component.- Returns:
- the value of the
answersrecord component
-