public class ObjectUtils
extends org.apache.commons.lang.ObjectUtils
Modifier and Type | Field and Description |
---|---|
protected static 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,
Integer 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. |
static String |
toString(Object obj) |
protected static final 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, Integer 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–2015 MuleSoft, Inc.. All rights reserved.