Package org.beryx.textio
Class ShortInputReader
- java.lang.Object
-
- org.beryx.textio.InputReader<T,B>
-
- org.beryx.textio.ComparableInputReader<java.lang.Short,ShortInputReader>
-
- org.beryx.textio.ShortInputReader
-
public class ShortInputReader extends ComparableInputReader<java.lang.Short,ShortInputReader>
A reader for short values.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.beryx.textio.InputReader
InputReader.ErrorMessagesProvider, InputReader.InvalidIndexErrorMessagesProvider, InputReader.ParseResult<T>, InputReader.ValueChecker<T>
-
-
Field Summary
-
Fields inherited from class org.beryx.textio.ComparableInputReader
maxVal, minVal
-
Fields inherited from class org.beryx.textio.InputReader
defaultValue, equalsFunc, inlinePossibleValues, inputMasking, inputTrimming, invalidIndexErrorMessagesProvider, itemName, numberedPossibleValues, parseErrorMessagesProvider, possibleValues, promptAdjustments, propertiesConfigurator, PROPS_PREFIX_ERROR_MESSAGE, textTerminalSupplier, valueCheckers, valueFormatter, valueListCheckers
-
-
Constructor Summary
Constructors Constructor Description ShortInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputReader.ParseResult<java.lang.Short>
parse(java.lang.String s)
Parses the input stringprotected java.lang.String
typeNameWithIndefiniteArticle()
-
Methods inherited from class org.beryx.textio.ComparableInputReader
checkConfiguration, getMinMaxErrorMessage, isInRange, withMaxVal, withMinVal
-
Methods inherited from class org.beryx.textio.InputReader
executeWithTerminal, getDefaultErrorMessage, getDefaultErrorMessages, getErrorMessages, getPossibleValue, isPossibleValue, isValueListMode, noDuplicatesChecker, nonEmptyListChecker, parseAndCheck, printPrompt, read, read, readList, readList, readWithPrompt, withDefaultValue, withEqualsFunc, withInlinePossibleValues, withInlinePossibleValues, withInputMasking, withInputTrimming, withInvalidIndexErrorMessagesProvider, withItemName, withNumberedPossibleValues, withNumberedPossibleValues, withParseErrorMessagesProvider, withPossibleValues, withPossibleValues, withPromptAdjustments, withPropertiesConfigurator, withPropertiesPrefix, withValueChecker, withValueFormatter, withValueListChecker
-
-
-
-
Constructor Detail
-
ShortInputReader
public ShortInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier)
-
-
Method Detail
-
typeNameWithIndefiniteArticle
protected java.lang.String typeNameWithIndefiniteArticle()
- Specified by:
typeNameWithIndefiniteArticle
in classComparableInputReader<java.lang.Short,ShortInputReader>
-
parse
protected InputReader.ParseResult<java.lang.Short> parse(java.lang.String s)
Description copied from class:InputReader
Parses the input string- Specified by:
parse
in classInputReader<java.lang.Short,ShortInputReader>
- Parameters:
s
- the input string- Returns:
- a
InputReader.ParseResult
that holds the parsed value and/or the error messages, if errors occurred.
-
-