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