public final class JkUtilsObject
extends java.lang.Object
Constructor and Description |
---|
JkUtilsObject() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(java.lang.Object object1,
java.lang.Object object2)
Returns
true if both object are |
static <T> T |
firstNonNull(T... items)
Returns the objects of the specified array that is not
null . |
static int |
hashCode(java.lang.Object object)
Returns the hash code of the specified object or 0 if it's
null . |
static java.lang.String |
toString(java.lang.Object object)
Null safe for
Object.toString() . |
public static <T> T firstNonNull(T... items)
null
.
Throw an IllegalArgumentException
if all array elements are
null
or the specified array is empty.public static boolean equals(java.lang.Object object1, java.lang.Object object2)
true if both object are null
or the two
obects are equals. Returns false
otherwise.
public static int hashCode(java.lang.Object object)
null
.public static java.lang.String toString(java.lang.Object object)
Object.toString()
. If the specified object is
null
than this method returns "null".