|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.lang.math.NumberUtils org.mule.util.NumberUtils
public class NumberUtils
NumberUtils
contains useful methods for manipulating numbers.
Field Summary | |
---|---|
static double |
DOUBLE_ERROR
|
static float |
FLOAT_ERROR
|
static int |
INTEGER_ERROR
|
static long |
LONG_ERROR
|
Fields inherited from class org.apache.commons.lang.math.NumberUtils |
---|
BYTE_MINUS_ONE, BYTE_ONE, BYTE_ZERO, DOUBLE_MINUS_ONE, DOUBLE_ONE, DOUBLE_ZERO, FLOAT_MINUS_ONE, FLOAT_ONE, FLOAT_ZERO, INTEGER_MINUS_ONE, INTEGER_ONE, INTEGER_ZERO, LONG_MINUS_ONE, LONG_ONE, LONG_ZERO, SHORT_MINUS_ONE, SHORT_ONE, SHORT_ZERO |
Constructor Summary | |
---|---|
NumberUtils()
|
Method Summary | ||
---|---|---|
static
|
convertNumberToTargetClass(Number number,
Class<T> targetClass)
|
|
static
|
parseNumber(String text,
Class<T> targetClass)
|
|
static double |
toDouble(Object obj)
|
|
static double |
toDouble(String str)
|
|
static float |
toFloat(Object obj)
|
|
static float |
toFloat(String str)
|
|
static int |
toInt(Object obj)
|
|
static int |
toInt(String str)
|
|
static long |
toLong(Object obj)
|
|
static long |
toLong(String str)
|
Methods inherited from class org.apache.commons.lang.math.NumberUtils |
---|
compare, compare, createBigDecimal, createBigInteger, createDouble, createFloat, createInteger, createLong, createNumber, isDigits, isNumber, max, max, max, max, max, max, max, max, max, max, max, max, min, min, min, min, min, min, min, min, min, min, min, min, stringToInt, stringToInt, toDouble, toFloat, toInt, toLong |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INTEGER_ERROR
public static final long LONG_ERROR
public static final float FLOAT_ERROR
public static final double DOUBLE_ERROR
Constructor Detail |
---|
public NumberUtils()
Method Detail |
---|
public static long toLong(Object obj)
public static int toInt(Object obj)
public static float toFloat(Object obj)
public static double toDouble(Object obj)
public static int toInt(String str)
public static long toLong(String str)
public static float toFloat(String str)
public static double toDouble(String str)
public static <T extends Number> T parseNumber(String text, Class<T> targetClass)
public static <T extends Number> T convertNumberToTargetClass(Number number, Class<T> targetClass) throws IllegalArgumentException
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |