public class

ObjectUtils

extends Object
java.lang.Object
   ↳ com.atlassian.core.util.ObjectUtils

Class Overview

Some common methods used against Object objects

Summary

Fields
protected static Method hibernateGetClassMethod
Public Constructors
ObjectUtils()
Public Methods
static Predicate getIsSetPredicate()
Returns a predicate for isNotEmpty(Object)
static Class getTrueClass(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(Object a, Object b)
static boolean isIdentical(Object a, Object b)
static boolean isNotEmpty(Object o)
Similar to isNotEmpty(String) but accepts a Sttring.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected static Method hibernateGetClassMethod

Public Constructors

public ObjectUtils ()

Public Methods

public static Predicate getIsSetPredicate ()

Returns a predicate for isNotEmpty(Object)

Returns
  • Predicate

public static Class getTrueClass (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)

public static boolean isDifferent (Object a, Object b)

Returns
  • False if both are null or equal, otherwise returns true

public static boolean isIdentical (Object a, Object b)

Returns
  • True if both are null or equal, otherwise returns false

public static boolean isNotEmpty (Object o)

Similar to isNotEmpty(String) but accepts a Sttring. Type safe

Returns
  • true if the object is not null && != ""