java.lang.Object
ushiosan.jvm_utilities.lang.Numbers
Class containing functionality for general number manipulation
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisDecimal(double number) Determine if a decimal number contains decimals after the floating point.static @NotNull @Unmodifiable Numberparse(@NotNull CharSequence content) Returns a newNumberinitialized to the value represented by the specifiedString.
-
Method Details
-
isDecimal
public static boolean isDecimal(double number) Determine if a decimal number contains decimals after the floating point.- Parameters:
number- the number to evaluate- Returns:
trueif the number contains decimals orfalseotherwise
-
parse
Returns a newNumberinitialized to the value represented by the specifiedString.- Parameters:
content- the string to be parsed- Returns:
- the
Numbervalue represented by the string argument - Throws:
NumberFormatException- if the string does not contain a parsableNumber
-