public class NumberUtils
extends org.apache.commons.lang3.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| Modifier | Constructor and Description |
|---|---|
protected |
NumberUtils()
Disabled constructor, utility class.
|
| Modifier and Type | Method and Description |
|---|---|
static byte |
byteValue(Number number)
Get the null safe byteValue of a Number.
|
static int |
compare(int lhs,
int rhs) |
static double |
doubleValue(Number number)
Get the null safe doubleValue of a Number.
|
static float |
floatValue(Number number)
Get the null safe floatValue of a Number.
|
static int |
intValue(Number number)
Get the null safe intValue of a Number.
|
static double |
limit(double value,
double min,
double max) |
static float |
limit(float value,
float min,
float max) |
static int |
limit(int value,
int min,
int max) |
static long |
limit(long value,
long min,
long max) |
static long |
longValue(Number number)
Get the null safe longValue of a Number.
|
static short |
shortValue(Number number)
Get the null safe shortValue of a Number.
|
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, toByte, toByte, toDouble, toDouble, toFloat, toFloat, toInt, toInt, toLong, toLong, toShort, toShortpublic static int intValue(Number number)
number - The Number to convert.public static double doubleValue(Number number)
number - The Number to convert.public static byte byteValue(Number number)
number - The Number to convert.public static long longValue(Number number)
number - The Number to convert.public static short shortValue(Number number)
number - The Number to convert.public static float floatValue(Number number)
number - The Number to convert.public static int limit(int value,
int min,
int max)
public static long limit(long value,
long min,
long max)
public static float limit(float value,
float min,
float max)
public static double limit(double value,
double min,
double max)
public static int compare(int lhs,
int rhs)
Copyright © 2013 dontdrinkandroot. All Rights Reserved.