public class ObjectUtils
extends org.apache.commons.lang.ObjectUtils
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
logger
logger used by this class
|
Constructor and Description |
---|
ObjectUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
getBoolean(Object answer,
boolean defaultValue)
Gets a boolean from a value in a null-safe manner.
|
static byte |
getByte(Object answer,
byte defaultValue)
Gets a byte from a value in a null-safe manner.
|
static double |
getDouble(Object answer,
double defaultValue)
Gets a double from a value in a null-safe manner.
|
static float |
getFloat(Object answer,
float defaultValue)
Gets a float from a value in a null-safe manner.
|
static int |
getInt(Object answer,
int defaultValue)
Gets a int from a value in a null-safe manner.
|
static long |
getLong(Object answer,
long defaultValue)
Gets a long from a value in a null-safe manner.
|
static short |
getShort(Object answer,
short defaultValue)
Gets a short from a value in a null-safe manner.
|
static String |
getString(Object answer,
String defaultValue)
Gets a String from a value in a null-safe manner.
|
static String |
identityToShortString(Object obj)
Like
ObjectUtils.identityToString(Object) but without the object's full package
name. |
protected static final org.apache.commons.logging.Log logger
public static String identityToShortString(Object obj)
ObjectUtils.identityToString(Object)
but without the object's full package
name.obj
- the object for which the identity description is to be generatedpublic static String getString(Object answer, String defaultValue)
answer
- the object valuedefaultValue
- the default to use if null or of incorrect typepublic static boolean getBoolean(Object answer, boolean defaultValue)
answer
- the object valuedefaultValue
- the default to use if null or of incorrect typepublic static byte getByte(Object answer, byte defaultValue)
answer
- the object valuedefaultValue
- the default to use if null or of incorrect typepublic static short getShort(Object answer, short defaultValue)
answer
- the object valuedefaultValue
- the default to use if null or of incorrect typepublic static int getInt(Object answer, int defaultValue)
answer
- the object valuedefaultValue
- the default to use if null or of incorrect typepublic static long getLong(Object answer, long defaultValue)
answer
- the object valuedefaultValue
- the default to use if null or of incorrect typepublic static float getFloat(Object answer, float defaultValue)
answer
- the object valuedefaultValue
- the default to use if null or of incorrect typepublic static double getDouble(Object answer, double defaultValue)
answer
- the object valuedefaultValue
- the default to use if null or of incorrect typeCopyright © 2003–2013 MuleSource, Inc.. All rights reserved.