public class ObjectUtils extends Object
| Constructor and Description |
|---|
ObjectUtils() |
| Modifier and Type | Method and Description |
|---|---|
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. |
static boolean |
notEqual(Object main,
Object other)
Return true if
main is definitely not equal to other. |
public ObjectUtils()
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
main - The object other is being compared to.other - The object being examined for equality with main.NullPointerException - If main is null or main.toString() returns nullpublic static boolean notEqual(Object main, Object other)
main is definitely not equal to other. More precisely, if other is null OR a different runtime type than
main, return truemain - The object other is being compared to.other - The object being examined for equality with main.NullPointerException - If main is nullCopyright © 2010–2014 The Kuali Foundation. All rights reserved.