Interface PromptOptionMatcher<TOption>
- Type Parameters:
TOption
- Option type
- All Known Implementing Classes:
DefaultMatcher
,ExactIgnoresCaseMatcher
,ExactMatcher
,IgnoresCaseMatcher
,IndexMatcher
,ValueMatcher
public interface PromptOptionMatcher<TOption>
Interfaces for option matchers that controls how options are matched to the prompt response when using
Prompt.promptForOption(boolean)
-
Method Summary
-
Method Details
-
match
Matches the response to an option provided by the prompt- Parameters:
prompt
- Promptresponse
- Response value that has been read from the prompt- Returns:
- Matched option
- Throws:
PromptException
- Thrown if the response value does not match any option, or if the matcher is not compatible with the prompt
-