com.jdroid.java.utils
Class ObjectUtils

java.lang.Object
  extended by com.jdroid.java.utils.ObjectUtils

public class ObjectUtils
extends Object

Operations on Object.


Constructor Summary
ObjectUtils()
           
 
Method Summary
static boolean equals(Object object1, Object object2)
           Compares two objects for equality, where either one or both objects may be null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectUtils

public ObjectUtils()
Method Detail

equals

public static boolean equals(Object object1,
                             Object object2)

Compares two objects for equality, where either one or both objects may be null.

 ObjectUtils.equals(null, null)                  = true
 ObjectUtils.equals(null, "")                    = false
 ObjectUtils.equals("", null)                    = false
 ObjectUtils.equals("", "")                      = true
 ObjectUtils.equals(Boolean.TRUE, null)          = false
 ObjectUtils.equals(Boolean.TRUE, "true")        = false
 ObjectUtils.equals(Boolean.TRUE, Boolean.TRUE)  = true
 ObjectUtils.equals(Boolean.TRUE, Boolean.FALSE) = false
 

Parameters:
object1 - the first object, may be null
object2 - the second object, may be null
Returns:
true if the values of both objects are the same


Copyright © 2014. All rights reserved.