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 usingPrompt.promptForOption(boolean)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TOption
match(Prompt<TOption> prompt, java.lang.String response)
Matches the response to an option provided by the prompt
-
-
-
Method Detail
-
match
TOption match(Prompt<TOption> prompt, java.lang.String response) throws PromptException
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
-
-