com.atlassian.core.util
Class ObjectUtils
java.lang.Object
com.atlassian.core.util.ObjectUtils
public class ObjectUtils
- extends java.lang.Object
Some common methods used against Object objects
|
Method Summary |
static org.apache.commons.collections.Predicate |
getIsSetPredicate()
Returns a predicate for isNotEmpty(Object) |
static java.lang.Class |
getTrueClass(java.lang.Object o)
Gets the true class of an object, trying to use Hibernate's proxy unwrapping tools if available on the classpath. |
static boolean |
isDifferent(java.lang.Object a,
java.lang.Object b)
|
static boolean |
isIdentical(java.lang.Object a,
java.lang.Object b)
|
static boolean |
isNotEmpty(java.lang.Object o)
Similar to StringUtils.isNotEmpty(java.lang.String) but accepts a Sttring. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hibernateGetClassMethod
protected static java.lang.reflect.Method hibernateGetClassMethod
ObjectUtils
public ObjectUtils()
isIdentical
public static boolean isIdentical(java.lang.Object a,
java.lang.Object b)
- Returns:
- True if both are null or equal, otherwise returns false
isDifferent
public static boolean isDifferent(java.lang.Object a,
java.lang.Object b)
- Returns:
- False if both are null or equal, otherwise returns true
isNotEmpty
public static boolean isNotEmpty(java.lang.Object o)
- Similar to
StringUtils.isNotEmpty(java.lang.String) but accepts a Sttring. Type safe
- Parameters:
o -
- Returns:
- true if the object is not null && != ""
getIsSetPredicate
public static org.apache.commons.collections.Predicate getIsSetPredicate()
- Returns a predicate for
isNotEmpty(Object)
- Returns:
- Predicate
getTrueClass
public static java.lang.Class getTrueClass(java.lang.Object o)
- Gets the true class of an object, trying to use Hibernate's proxy unwrapping tools if available on the classpath.
Otherwise simply returns the class of the object passed in if Hibernate not on the classpath.
- Parameters:
o - The object to examine
- Returns:
- The true class of the object (unwrapping Hibernate proxies etc)
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.