Package com.earth2me.essentials.utils
Class NumberUtil
java.lang.Object
com.earth2me.essentials.utils.NumberUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
constrainToRange
(int value, int min, int max) Backport from Guava.static String
displayCurrency
(BigDecimal value, IEssentials ess) static String
displayCurrencyExactly
(BigDecimal value, IEssentials ess) static String
formatAsCurrency
(BigDecimal value) static String
formatAsPrettyCurrency
(BigDecimal value) static String
formatDouble
(double value) static void
internalSetPrettyFormat
(NumberFormat prettyFormat) static boolean
isHexadecimal
(String sNum) static boolean
static boolean
static boolean
static boolean
isPositiveInt
(String sInt) static String
sanitizeCurrencyString
(String input, IEssentials ess) static String
shortCurrency
(BigDecimal value, IEssentials ess)
-
Method Details
-
internalSetPrettyFormat
-
shortCurrency
-
formatDouble
-
formatAsCurrency
-
formatAsPrettyCurrency
-
displayCurrency
-
displayCurrencyExactly
-
sanitizeCurrencyString
-
isInt
-
isLong
-
isPositiveInt
-
isNumeric
-
isHexadecimal
-
constrainToRange
public static int constrainToRange(int value, int min, int max) Backport from Guava.
-