org.kuali.common.util
Class ObjectUtils

java.lang.Object
  extended by org.kuali.common.util.ObjectUtils

public class ObjectUtils
extends Object


Constructor Summary
ObjectUtils()
           
 
Method Summary
static boolean equalsByToString(Object main, Object other)
           This method returns true if the toString() methods on both objects return matching strings AND both objects are the exact same runtime type.
 
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

equalsByToString

public static boolean equalsByToString(Object main,
                                       Object other)

This method returns true if the toString() methods on both objects return matching strings AND both objects are the exact same runtime type.

Returns true immediately if main==other (ie they are the same object).

Returns false immediately if other==null or is a different runtime type than main.

If neither one is null, and both are the exact same runtime type, then compare the toString() methods

Parameters:
main - The object other is being compared to.
other - The object being examined for equality with main.
Throws:
NullPointerException - If main is null or main.toString() returns null


Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.