public class BooleanInputReader extends InputReader<Boolean,BooleanInputReader>
InputReader.ErrorMessagesProvider, InputReader.ParseResult<T>, InputReader.ValueChecker<T>
defaultValue, equalsFunc, inputMasking, inputTrimming, numberedPossibleValues, parseErrorMessagesProvider, possibleValues, propertyName, textTerminalSupplier, valueCheckers, valueFormatter, valueListCheckers
Constructor and Description |
---|
BooleanInputReader(Supplier<TextTerminal> textTerminalSupplier) |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
getDefaultErrorMessages(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<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, getErrorMessages, isPossibleValue, isValueListMode, noDuplicatesChecker, nonEmptyListChecker, parseAndCheck, printPrompt, read, read, readList, readList, withDefaultValue, withEqualsFunc, withInputMasking, withInputTrimming, withNumberedPossibleValues, withParseErrorMessagesProvider, withPossibleValues, withPossibleValues, withPropertyName, withValueChecker, withValueFormatter, withValueListChecker
public BooleanInputReader(Supplier<TextTerminal> textTerminalSupplier)
public BooleanInputReader withTrueInput(String trueInput)
public BooleanInputReader withFalseInput(String falseInput)
protected List<String> getDefaultErrorMessages(String s)
InputReader
InputReader.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<Boolean,BooleanInputReader>
protected InputReader.ParseResult<Boolean> parse(String s)
InputReader
parse
in class InputReader<Boolean,BooleanInputReader>
s
- the input stringInputReader.ParseResult
that holds the parsed value and/or the error messages, if errors occurred.