public class BooleanInputReader extends InputReader<Boolean,BooleanInputReader>
InputReader.ErrorMessageProvider, InputReader.ParseResult<T>defaultValue, errorMessageProvider, inputMasking, inputTrimming, numberedPossibleValues, possibleValues, propertyName, textTerminalSupplier, valueFormatter| Constructor and Description |
|---|
BooleanInputReader(Supplier<TextTerminal> textTerminalSupplier) |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
getDefaultErrorMessage(String s)
If no errorMessageProvider exists, this method is used to provide the list of error messages for the input string s.
|
InputReader.ParseResult<Boolean> |
parse(String s)
Parses the input string
|
BooleanInputReader |
withFalseInput(String falseInput)
Configures the string value that corresponds to false.
|
BooleanInputReader |
withTrueInput(String trueInput)
Configures the string value that corresponds to true.
|
checkConfiguration, getDefaultErrorMessage, getErrorMessage, printPrompt, read, read, withDefaultValue, withErrorMessageProvider, withInputMasking, withInputTrimming, withNumberedPossibleValues, withPossibleValues, withPossibleValues, withPropertyName, withValueFormatterpublic BooleanInputReader(Supplier<TextTerminal> textTerminalSupplier)
public BooleanInputReader withTrueInput(String trueInput)
public BooleanInputReader withFalseInput(String falseInput)
protected List<String> getDefaultErrorMessage(String s)
InputReadergetDefaultErrorMessage in class InputReader<Boolean,BooleanInputReader>public InputReader.ParseResult<Boolean> parse(String s)
InputReaderparse in class InputReader<Boolean,BooleanInputReader>s - the input stringInputReader.ParseResult that holds the parsed value and/or the error messages, if errors occurred.