Package akka.javasdk.decision
Class ChoiceBuilder.Ready
Object
akka.javasdk.decision.ChoiceBuilder.Ready
- Enclosing class:
ChoiceBuilder
A choice question with at least two options. Add more options or build the question.
-
Method Summary
Modifier and TypeMethodDescriptionBuild the question with the given key.Add another option.
-
Method Details
-
option
Add another option.- Parameters:
key- the key returned inAnswer.Choice.selected()when the model picks this optiondescription- what the option covers
-
build
Build the question with the given key. The key identifies the question and its answer, so it must be the same everywhere the question is built, also across restarts and services.- Throws:
IllegalArgumentException- when two options have the same key
-