Class InputFormat
java.lang.Object
de.redstoneworld.redutilities.input.InputFormat
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isIntegerNumber
(String cmdInput) This method validate the input string and check if it's a valid integer.static boolean
isNaturalNumber
(String cmdInput) This method validate the input string and check if it's a valid natural number without a signum of a permutation.static boolean
isPositiveNaturalNumber
(String cmdInput) This method validate the input string and check if it's a valid natural number without a signum of a permutation, and it's also greater than zero.static boolean
isRationalNumber
(String cmdInput) This method validate the input string and check if it's a valid rational number.
-
Constructor Details
-
InputFormat
public InputFormat()
-
-
Method Details
-
isNaturalNumber
This method validate the input string and check if it's a valid natural number without a signum of a permutation.- Returns:
- 'true' if the input is a natural number
-
isPositiveNaturalNumber
This method validate the input string and check if it's a valid natural number without a signum of a permutation, and it's also greater than zero.- Returns:
- 'true' if the input is a positive natural number
-
isIntegerNumber
This method validate the input string and check if it's a valid integer.- Returns:
- 'true' if the input is an integer
-
isRationalNumber
This method validate the input string and check if it's a valid rational number. Flexible inputs are allowed, which improves the usability. (Input-Formatter: 'Formatter.getRationalNumberValue')- Returns:
- 'true' if the input is a rational number
-