Package org.beryx.textio
Class IntInputReader
- java.lang.Object
-
- org.beryx.textio.InputReader<T,B>
-
- org.beryx.textio.ComparableInputReader<java.lang.Integer,IntInputReader>
-
- org.beryx.textio.IntInputReader
-
public class IntInputReader extends ComparableInputReader<java.lang.Integer,IntInputReader>
A reader for int 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 IntInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputReader.ParseResult<java.lang.Integer>parse(java.lang.String s)Parses the input stringprotected java.lang.StringtypeNameWithIndefiniteArticle()-
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
-
IntInputReader
public IntInputReader(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier)
-
-
Method Detail
-
typeNameWithIndefiniteArticle
protected java.lang.String typeNameWithIndefiniteArticle()
- Specified by:
typeNameWithIndefiniteArticlein classComparableInputReader<java.lang.Integer,IntInputReader>
-
parse
protected InputReader.ParseResult<java.lang.Integer> parse(java.lang.String s)
Description copied from class:InputReaderParses the input string- Specified by:
parsein classInputReader<java.lang.Integer,IntInputReader>- Parameters:
s- the input string- Returns:
- a
InputReader.ParseResultthat holds the parsed value and/or the error messages, if errors occurred.
-
-