public class NumberUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Byte |
BYTE_MINUS_ONE |
static Byte |
BYTE_ONE |
static Byte |
BYTE_ZERO |
static Double |
DOUBLE_MINUS_ONE |
static Double |
DOUBLE_ONE |
static Double |
DOUBLE_ZERO |
static Float |
FLOAT_MINUS_ONE |
static Float |
FLOAT_ONE |
static Float |
FLOAT_ZERO |
static Integer |
INTEGER_MINUS_ONE |
static Integer |
INTEGER_ONE |
static Integer |
INTEGER_ZERO |
static Long |
LONG_MINUS_ONE |
static Long |
LONG_ONE |
static Long |
LONG_ZERO |
static Short |
SHORT_MINUS_ONE |
static Short |
SHORT_ONE |
static Short |
SHORT_ZERO |
| Constructor and Description |
|---|
NumberUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(double lhs,
double rhs) |
static int |
compare(float lhs,
float rhs) |
static BigDecimal |
createBigDecimal(String str) |
static BigInteger |
createBigInteger(String str) |
static Double |
createDouble(String str) |
static Float |
createFloat(String str) |
static Integer |
createInteger(String str) |
static Long |
createLong(String str) |
static Number |
createNumber(String str) |
static boolean |
isDigits(String str) |
static boolean |
isNumber(String str) |
static byte |
max(byte[] array) |
static byte |
max(byte a,
byte b,
byte c) |
static double |
max(double[] array) |
static double |
max(double a,
double b,
double c) |
static float |
max(float[] array) |
static float |
max(float a,
float b,
float c) |
static int |
max(int[] array) |
static int |
max(int a,
int b,
int c) |
static long |
max(long[] array) |
static long |
max(long a,
long b,
long c) |
static short |
max(short[] array) |
static short |
max(short a,
short b,
short c) |
static byte |
min(byte[] array) |
static byte |
min(byte a,
byte b,
byte c) |
static double |
min(double[] array) |
static double |
min(double a,
double b,
double c) |
static float |
min(float[] array) |
static float |
min(float a,
float b,
float c) |
static int |
min(int[] array) |
static int |
min(int a,
int b,
int c) |
static long |
min(long[] array) |
static long |
min(long a,
long b,
long c) |
static short |
min(short[] array) |
static short |
min(short a,
short b,
short c) |
static int |
stringToInt(String str) |
static int |
stringToInt(String str,
int defaultValue) |
static byte |
toByte(String str) |
static byte |
toByte(String str,
byte defaultValue) |
static double |
toDouble(String str) |
static double |
toDouble(String str,
double defaultValue) |
static float |
toFloat(String str) |
static float |
toFloat(String str,
float defaultValue) |
static int |
toInt(String str) |
static int |
toInt(String str,
int defaultValue) |
static long |
toLong(String str) |
static long |
toLong(String str,
long defaultValue) |
static short |
toShort(String str) |
static short |
toShort(String str,
short defaultValue) |
public static final Long LONG_ZERO
public static final Long LONG_ONE
public static final Long LONG_MINUS_ONE
public static final Integer INTEGER_ZERO
public static final Integer INTEGER_ONE
public static final Integer INTEGER_MINUS_ONE
public static final Short SHORT_ZERO
public static final Short SHORT_ONE
public static final Short SHORT_MINUS_ONE
public static final Byte BYTE_ZERO
public static final Byte BYTE_ONE
public static final Byte BYTE_MINUS_ONE
public static final Double DOUBLE_ZERO
public static final Double DOUBLE_ONE
public static final Double DOUBLE_MINUS_ONE
public static final Float FLOAT_ZERO
public static final Float FLOAT_ONE
public static final Float FLOAT_MINUS_ONE
public static int stringToInt(String str)
public static int toInt(String str)
public static int stringToInt(String str, int defaultValue)
public static int toInt(String str, int defaultValue)
public static long toLong(String str)
public static long toLong(String str, long defaultValue)
public static float toFloat(String str)
public static float toFloat(String str, float defaultValue)
public static double toDouble(String str)
public static double toDouble(String str, double defaultValue)
public static byte toByte(String str)
public static byte toByte(String str, byte defaultValue)
public static short toShort(String str)
public static short toShort(String str, short defaultValue)
public static Number createNumber(String str) throws NumberFormatException
NumberFormatExceptionpublic static BigInteger createBigInteger(String str)
public static BigDecimal createBigDecimal(String str)
public static long min(long[] array)
public static int min(int[] array)
public static short min(short[] array)
public static byte min(byte[] array)
public static double min(double[] array)
public static float min(float[] array)
public static long max(long[] array)
public static int max(int[] array)
public static short max(short[] array)
public static byte max(byte[] array)
public static double max(double[] array)
public static float max(float[] array)
public static long min(long a,
long b,
long c)
public static int min(int a,
int b,
int c)
public static short min(short a,
short b,
short c)
public static byte min(byte a,
byte b,
byte c)
public static double min(double a,
double b,
double c)
public static float min(float a,
float b,
float c)
public static long max(long a,
long b,
long c)
public static int max(int a,
int b,
int c)
public static short max(short a,
short b,
short c)
public static byte max(byte a,
byte b,
byte c)
public static double max(double a,
double b,
double c)
public static float max(float a,
float b,
float c)
public static int compare(double lhs,
double rhs)
public static int compare(float lhs,
float rhs)
public static boolean isDigits(String str)
public static boolean isNumber(String str)
Copyright © 2016 jufeng. All rights reserved.