Choice Class
- java.
lang. Object - com.
microsoft. bot. dialogs. choices. Choice
- com.
public class Choice
Represents a choice for a choice prompt.
Constructor Summary
| Constructor | Description |
|---|---|
| Choice() |
Creates a Choice. |
| Choice(String withValue) |
Creates a Choice. |
| Choice(String withValue, String[] withSynonyms) |
Creates a Choice. |
| Choice(String withValue, List<String> withSynonyms) |
Creates a Choice. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Card |
getAction()
Gets the action to use when rendering the choice as a suggested action or hero card. |
| java.util.List<java.lang.String> |
getSynonyms()
Gets the list of synonyms to recognize in addition to the value. |
| java.lang.String |
getValue()
Gets the value to return when selected. |
| void |
setAction(CardAction withAction)
Sets the action to use when rendering the choice as a suggested action or hero card. |
| void |
setSynonyms(List<String> withSynonyms)
Sets the list of synonyms to recognize in addition to the value. |
| void |
setValue(String withValue)
Sets the value to return when selected. |
Methods inherited from java.lang.Object
Constructor Details
Choice
public Choice()
Creates a Choice.
Choice
public Choice(String withValue)
Creates a Choice.
Parameters:
Choice
public Choice(String withValue, String[] withSynonyms)
Creates a Choice.
Parameters:
Choice
public Choice(String withValue, List
Creates a Choice.
Parameters:
Method Details
getAction
public CardAction getAction()
Gets the action to use when rendering the choice as a suggested action or hero card.
Returns:
getSynonyms
public List
Gets the list of synonyms to recognize in addition to the value. This is optional.
Returns:
getValue
public String getValue()
Gets the value to return when selected.
Returns:
setAction
public void setAction(CardAction withAction)
Sets the action to use when rendering the choice as a suggested action or hero card.
Parameters:
setSynonyms
public void setSynonyms(List
Sets the list of synonyms to recognize in addition to the value. This is optional.
Parameters:
setValue
public void setValue(String withValue)
Sets the value to return when selected.
Parameters: