public final class ObjectUtils
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
ObjectUtils()
Constructor
|
Modifier and Type | Method and Description |
---|---|
static boolean |
toBool(java.lang.Object value,
boolean def)
Convert the object the boolean, return the default if it cannot be converted
|
static double |
toDouble(java.lang.Object value,
double def)
Convert the object to double, or return the default if it cannot be converted
|
static float |
toFloat(java.lang.Object value,
float def)
Convert the object to float, or return the default if it cannot be converted
|
static int |
toInt(java.lang.Object value,
int def)
Convert the object to int, or return the default if it cannot be converted
|
static long |
toLong(java.lang.Object value,
long def)
Convert the object to long, or return the default if it cannot be converted
|
public static final boolean toBool(java.lang.Object value, boolean def)
value
- the valuedef
- the defaultpublic static int toInt(java.lang.Object value, int def)
value
- the valuedef
- the defaultpublic static long toLong(java.lang.Object value, long def)
value
- the valuedef
- the defaultpublic static float toFloat(java.lang.Object value, float def)
value
- the valuedef
- the defaultpublic static double toDouble(java.lang.Object value, double def)
value
- the valuedef
- the default