public final class NumberUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Double |
convertToDouble(Object object) |
static DoubleValue |
convertToDoubleValue(Object object) |
static Class<?> |
getNumericPrimitive(Class<?> wrapperClass) |
static int |
getScale(double value) |
static int |
getScale(float value) |
static int |
getScale(Number value)
Gets the scale of the income value.
|
static boolean |
isFloatPointNumber(Object object) |
static boolean |
isFloatPointType(Class<?> clazz) |
static Double |
roundValue(Double value,
int scale) |
public static boolean isFloatPointNumber(Object object)
public static boolean isFloatPointType(Class<?> clazz)
public static DoubleValue convertToDoubleValue(Object object)
public static int getScale(Number value)
Float or FloatValue,
the scale will be defined via value.doubleValue() method call. And the scale will differ from the income.value - {@link - NullPointerException} if the income is nullpublic static int getScale(double value)
public static int getScale(float value)
Copyright © 2004–2019 OpenL Tablets. All rights reserved.