Package com.jeff_media.jefflib
Class NumberUtils
java.lang.Object
com.jeff_media.jefflib.NumberUtils
Number parsing related methods
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isEqual
(double number1, double number2) static boolean
isEqual
(float number1, float number2) static boolean
isInbetweenInclusive
(int number, int min, int max) boolean
Checks if a given String is an Integer.static boolean
isZero
(double number) Checks if the given number is close to zerostatic boolean
isZero
(float number) Checks if the given number is close to zerostatic boolean
Checks if the given number is close to zerostatic boolean
isZeroOrNegative
(double number) Checks if the given number is close to or lower than zerostatic boolean
isZeroOrNegative
(float number) Checks if the given number is close to or lower than zerostatic boolean
isZeroOrNegative
(Number number) Checks if the given number is close to or lower than zerostatic boolean
isZeroOrPositive
(double number) Checks if the given number is close to or higher than zerostatic boolean
isZeroOrPositive
(float number) Checks if the given number is close to or higher than zerostatic boolean
isZeroOrPositive
(Number number) Checks if the given number is close to or higher than zeroparseInteger
(String text) Returns the given String as Integer, or null if it isn't an Integer.
-
Field Details
-
EPSILON_D
- See Also:
-
EPSILON_F
- See Also:
-
-
Constructor Details
-
NumberUtils
public NumberUtils()
-
-
Method Details
-
isEqual
-
isZero
Checks if the given number is close to zero -
isEqual
-
isZero
Checks if the given number is close to zero -
isZeroOrPositive
Checks if the given number is close to or higher than zero -
isZeroOrPositive
Checks if the given number is close to or higher than zero -
isZeroOrPositive
Checks if the given number is close to or higher than zero -
isZero
Checks if the given number is close to zero -
isZeroOrNegative
Checks if the given number is close to or lower than zero -
isZeroOrNegative
Checks if the given number is close to or lower than zero -
isZeroOrNegative
Checks if the given number is close to or lower than zero -
isInteger
Checks if a given String is an Integer. -
parseInteger
Returns the given String as Integer, or null if it isn't an Integer. -
isInbetweenInclusive
-