
public final class CompareUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
nullSafeEquals(Object obj1,
Object obj2)
Checks if two objects (eventually null) are the same.
|
static int |
nullSafeHashCode(Object obj)
Returns
0 if the object is null, the hash code of the object
otherwise. |
public static boolean nullSafeEquals(Object obj1, Object obj2)
obj1 - The first object to check.obj2 - The second object to check.true if the objects are the same.public static int nullSafeHashCode(Object obj)
0 if the object is null, the hash code of the object
otherwise.obj - The object from which the hash code must be calculated..Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.