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