public class EnumInputReader<T extends java.lang.Enum<T>> extends InputReader<T,EnumInputReader<T>>
InputReader.possibleValues with the constants returned by the values() method.
By default, it uses a numbered list for displaying the possible values.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 |
|---|
EnumInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier,
java.lang.Class<T> enumClass) |
| Modifier and Type | Method and Description |
|---|---|
protected InputReader.ParseResult<T> |
parse(java.lang.String s)
Parses the input string
|
EnumInputReader<T> |
withAllValues() |
EnumInputReader<T> |
withAllValuesInline() |
EnumInputReader<T> |
withAllValuesNumbered() |
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, withPropertiesPrefix, withValueChecker, withValueFormatter, withValueListCheckerpublic EnumInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier, java.lang.Class<T> enumClass)
public EnumInputReader<T> withAllValues()
public EnumInputReader<T> withAllValuesNumbered()
public EnumInputReader<T> withAllValuesInline()
protected InputReader.ParseResult<T> parse(java.lang.String s)
InputReaderparse in class InputReader<T extends java.lang.Enum<T>,EnumInputReader<T extends java.lang.Enum<T>>>s - the input stringInputReader.ParseResult that holds the parsed value and/or the error messages, if errors occurred.