public class ChoiceCallback extends AbstractPromptCallback
prompt_id, content, VALUE| Constructor and Description |
|---|
ChoiceCallback() |
ChoiceCallback(org.json.JSONObject jsonObject,
int index) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getChoices()
Get the list of choices.
|
int |
getDefaultChoice()
Get the defaultChoice.
|
java.lang.String |
getType()
Return the type of the Callback, the type name should align with the Callback type returned
from AM
|
protected void |
setAttribute(java.lang.String name,
java.lang.Object value) |
void |
setSelectedIndex(int selection)
Set the selected choice.
|
getPromptget_id, getContent, getContentAsJson, getInputValue, getInputValue, getName, setContent, setValue, setValuepublic ChoiceCallback(org.json.JSONObject jsonObject,
int index)
throws org.json.JSONException
org.json.JSONExceptionpublic ChoiceCallback()
protected void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in class AbstractPromptCallbackpublic void setSelectedIndex(int selection)
selection - the selection represented as an index into the
choices list.public java.lang.String getType()
Callbackpublic java.util.List<java.lang.String> getChoices()
public int getDefaultChoice()
choices list.