public class BooleanInputReader extends InputReader<java.lang.Boolean,BooleanInputReader>
InputReader.ErrorMessagesProvider, InputReader.ParseResult<T>, InputReader.ValueChecker<T>defaultValue, equalsFunc, inlinePossibleValues, inputMasking, inputTrimming, itemName, numberedPossibleValues, parseErrorMessagesProvider, possibleValues, promptAdjustments, propertiesConfigurator, PROPS_PREFIX_ERROR_MESSAGE, textTerminalSupplier, valueCheckers, valueFormatter, valueListCheckers| Constructor and Description |
|---|
BooleanInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<java.lang.String> |
getDefaultErrorMessages(java.lang.String s)
If no
InputReader.parseErrorMessagesProvider exists, this method is used to provide the list of error messages for the input string s. |
protected InputReader.ParseResult<java.lang.Boolean> |
parse(java.lang.String s)
Parses the input string
|
protected void |
printPrompt(java.util.List<java.lang.String> prompt,
TextTerminal<?> textTerminal)
Displays a prompt inviting the user to enter a value.
|
BooleanInputReader |
withFalseInput(java.lang.String falseInput)
Configures the string value that corresponds to false.
|
BooleanInputReader |
withTrueInput(java.lang.String trueInput)
Configures the string value that corresponds to true.
|
checkConfiguration, executeWithTerminal, getDefaultErrorMessage, getErrorMessages, getPossibleValue, isPossibleValue, isValueListMode, noDuplicatesChecker, nonEmptyListChecker, parseAndCheck, read, read, readList, readList, readWithPrompt, withDefaultValue, withEqualsFunc, withInlinePossibleValues, withInlinePossibleValues, withInputMasking, withInputTrimming, withItemName, withNumberedPossibleValues, withNumberedPossibleValues, withParseErrorMessagesProvider, withPossibleValues, withPossibleValues, withPromptAdjustments, withPropertiesConfigurator, withPropertiesPrefix, withValueChecker, withValueFormatter, withValueListCheckerpublic BooleanInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier)
public BooleanInputReader withTrueInput(java.lang.String trueInput)
public BooleanInputReader withFalseInput(java.lang.String falseInput)
protected java.util.List<java.lang.String> getDefaultErrorMessages(java.lang.String s)
InputReaderInputReader.parseErrorMessagesProvider exists, this method is used to provide the list of error messages for the input string s.
It should return a non-empty list of messages.getDefaultErrorMessages in class InputReader<java.lang.Boolean,BooleanInputReader>protected InputReader.ParseResult<java.lang.Boolean> parse(java.lang.String s)
InputReaderparse in class InputReader<java.lang.Boolean,BooleanInputReader>s - the input stringInputReader.ParseResult that holds the parsed value and/or the error messages, if errors occurred.protected void printPrompt(java.util.List<java.lang.String> prompt,
TextTerminal<?> textTerminal)
InputReaderprintPrompt in class InputReader<java.lang.Boolean,BooleanInputReader>prompt - the list of prompt messages. May be null.textTerminal - the text terminal to which the messages are sent.