public final class JkUtilsObject
extends java.lang.Object
Constructor and Description |
---|
JkUtilsObject() |
Modifier and Type | Method and Description |
---|---|
static <T> void |
copyNonNullPublicFieldsInto(T source,
T overrider)
Copies non null public instance fields for specified overrider instance into the specified source one.
|
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() . |
static <T extends java.lang.Enum<T>> |
valueOfEnum(java.lang.Class<T> enumType,
java.lang.String name) |
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
objects 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".public static <T extends java.lang.Enum<T>> T valueOfEnum(java.lang.Class<T> enumType, java.lang.String name)
public static <T> void copyNonNullPublicFieldsInto(T source, T overrider)