ChoiceFactoryOptions Class
- java.
lang. Object - com.
microsoft. bot. dialogs. choices. ChoiceFactoryOptions
- com.
public class ChoiceFactoryOptions
Contains formatting options for presenting a list of choices.
Field Summary
| Modifier and Type | Field and Description |
|---|---|
| static final boolean | DEFAULT_INCLUDE_NUMBERS |
| static final java.lang.String | DEFAULT_INLINE_OR |
| static final java.lang.String | DEFAULT_INLINE_OR_MORE |
| static final java.lang.String | DEFAULT_INLINE_SEPERATOR |
Constructor Summary
| Constructor | Description |
|---|---|
| ChoiceFactoryOptions() |
Creates default options. |
| ChoiceFactoryOptions(ChoiceFactoryOptions options) |
Clones another options object, and applies defaults if needed. |
| ChoiceFactoryOptions(String withInlineSeparator, String withInlineOr, String withInlineOrMore) |
Creates options with the specified formatting values. |
| ChoiceFactoryOptions(String withInlineSeparator, String withInlineOr, String withInlineOrMore, boolean withIncludeNumbers) |
Initializes a new instance of the class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| java.lang.Boolean |
getIncludeNumbers()
Gets a value indicating whether an inline and list style choices will be prefixed with the index of the choice; as in "1. |
| java.lang.String |
getInlineOr()
Gets the separator inserted between the choices when their are only 2 choices. |
| java.lang.String |
getInlineOrMore()
Gets the separator inserted between the last 2 choices when their are more than 2 choices. |
| java.lang.String |
getInlineSeparator()
Gets the character used to separate individual choices when there are more than 2 choices. |
| void |
setIncludeNumbers(Boolean withIncludeNumbers)
Sets the value indicating whether an inline and list style choices will be prefixed with the index of the choice. |
| void |
setInlineOr(String withInlineOr)
Sets the separator inserted between the choices when their are only 2 choices. |
| void |
setInlineOrMore(String withInlineOrMore)
Sets the separator inserted between the last 2 choices when their are more than 2 choices. |
| void |
setInlineSeparator(String withSeperator)
Sets the character used to separate individual choices when there are more than 2 choices. |
Methods inherited from java.lang.Object
Field Details
DEFAULT_INCLUDE_NUMBERS
public static final boolean DEFAULT_INCLUDE_NUMBERS
DEFAULT_INLINE_OR
public static final String DEFAULT_INLINE_OR
DEFAULT_INLINE_OR_MORE
public static final String DEFAULT_INLINE_OR_MORE
DEFAULT_INLINE_SEPERATOR
public static final String DEFAULT_INLINE_SEPERATOR
Constructor Details
ChoiceFactoryOptions
public ChoiceFactoryOptions()
Creates default options.
ChoiceFactoryOptions
public ChoiceFactoryOptions(ChoiceFactoryOptions options)
Clones another options object, and applies defaults if needed.
Parameters:
ChoiceFactoryOptions
public ChoiceFactoryOptions(String withInlineSeparator, String withInlineOr, String withInlineOrMore)
Creates options with the specified formatting values.
Parameters:
ChoiceFactoryOptions
public ChoiceFactoryOptions(String withInlineSeparator, String withInlineOr, String withInlineOrMore, boolean withIncludeNumbers)
Initializes a new instance of the class. Refer to the code in teh ConfirmPrompt for an example of usage.
Parameters:
Method Details
getIncludeNumbers
public Boolean getIncludeNumbers()
Gets a value indicating whether an inline and list style choices will be prefixed with the index of the choice; as in "1. choice". If false, the list style will use a bulleted list instead. The default value is true.
Returns:
getInlineOr
public String getInlineOr()
Gets the separator inserted between the choices when their are only 2 choices. The default value is `" or "`. This is optional.
Returns:
getInlineOrMore
public String getInlineOrMore()
Gets the separator inserted between the last 2 choices when their are more than 2 choices. The default value is `", or "`. This is optional.
Returns:
getInlineSeparator
public String getInlineSeparator()
Gets the character used to separate individual choices when there are more than 2 choices. The default value is `", "`. This is optional.
Returns:
setIncludeNumbers
public void setIncludeNumbers(Boolean withIncludeNumbers)
Sets the value indicating whether an inline and list style choices will be prefixed with the index of the choice.
Parameters:
setInlineOr
public void setInlineOr(String withInlineOr)
Sets the separator inserted between the choices when their are only 2 choices.
Parameters:
setInlineOrMore
public void setInlineOrMore(String withInlineOrMore)
Sets the separator inserted between the last 2 choices when their are more than 2 choices.
Parameters:
setInlineSeparator
public void setInlineSeparator(String withSeperator)
Sets the character used to separate individual choices when there are more than 2 choices.
Parameters: