Package com.jahnreil_stratpoint.util
Class InputCheck<T>
java.lang.Object
com.jahnreil_stratpoint.util.InputCheck<T>
- Type Parameters:
T
- Type of the input value (can be Integer, Double, etc.)
InputCheck class validates and cleans user input.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> InputCheck<T>
inputCheckValues
(String inputStr, int maxChoice, InputType inputType) Validates and converts input string to the specified type.
-
Constructor Details
-
InputCheck
public InputCheck()
-
-
Method Details
-
inputCheckValues
public static <T> InputCheck<T> inputCheckValues(String inputStr, int maxChoice, InputType inputType) Validates and converts input string to the specified type.- Parameters:
inputStr
- the input string to validate and convertmaxChoice
- the maximum allowed value for integer inputsinputType
- the type of input (INT_WITH_MAX_CHOICE, INT_ONLY, TO_DOUBLE)- Returns:
- the input check result containing the converted value and validation status
-