public class ObjectUtil
extends java.lang.Object
| Constructor and Description |
|---|
ObjectUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(java.lang.Comparable object1,
java.lang.Comparable object2)
Returns a comparison of the two given objects.
|
static boolean |
equal(java.lang.Object object1,
java.lang.Object object2)
Returns whether the given objects are the same.
|
static int |
hashCode(java.lang.Object object)
Returns the hash code of the given object, or 0 if it is null.
|
public static boolean equal(java.lang.Object object1,
java.lang.Object object2)
object1 - the first object, may be null.object2 - the second object, may be null.public static int hashCode(java.lang.Object object)
object - the object, may be null.public static int compare(java.lang.Comparable object1,
java.lang.Comparable object2)
object1 - the first object, may be null.object2 - the second object, may be null.Comparable.compareTo(Object)