public class GenericInputReader<T> extends InputReader<T,GenericInputReader<T>>
InputReader.ErrorMessagesProvider, InputReader.ParseResult<T>, InputReader.ValueChecker<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.function.Function<java.lang.String,InputReader.ParseResult<T>> |
parser |
defaultValue, equalsFunc, inlinePossibleValues, inputMasking, inputTrimming, itemName, numberedPossibleValues, parseErrorMessagesProvider, possibleValues, promptAdjustments, propertiesConfigurator, textTerminalSupplier, valueCheckers, valueFormatter, valueListCheckers
Constructor and Description |
---|
GenericInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier,
java.util.function.Function<java.lang.String,InputReader.ParseResult<T>> parser) |
Modifier and Type | Method and Description |
---|---|
protected InputReader.ParseResult<T> |
parse(java.lang.String s)
Parses the input string
|
checkConfiguration, executeWithTerminal, getDefaultErrorMessage, getDefaultErrorMessages, getErrorMessages, getPossibleValue, isPossibleValue, isValueListMode, noDuplicatesChecker, nonEmptyListChecker, parseAndCheck, printPrompt, read, read, readList, readList, readWithPrompt, withDefaultValue, withEqualsFunc, withInlinePossibleValues, withInlinePossibleValues, withInputMasking, withInputTrimming, withItemName, withNumberedPossibleValues, withNumberedPossibleValues, withParseErrorMessagesProvider, withPossibleValues, withPossibleValues, withPromptAdjustments, withPropertiesConfigurator, withValueChecker, withValueFormatter, withValueListChecker
protected final java.util.function.Function<java.lang.String,InputReader.ParseResult<T>> parser
public GenericInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier, java.util.function.Function<java.lang.String,InputReader.ParseResult<T>> parser)
protected InputReader.ParseResult<T> parse(java.lang.String s)
InputReader
parse
in class InputReader<T,GenericInputReader<T>>
s
- the input stringInputReader.ParseResult
that holds the parsed value and/or the error messages, if errors occurred.