public final class Objects extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends Serializable> |
deepCopy(T original)
Provides a means to copy objects that do not implement Cloneable.
|
static boolean |
equals(Object o1,
Object o2)
Checks and answers if the two objects are both
null or equal. |
public static <T extends Serializable> T deepCopy(T original)
null, this method just returns null.T - the type of the object to be clonedoriginal - the object to copied, may be nullpublic static boolean equals(Object o1, Object o2)
null or equal.
Objects.equals(null, null) == true
Objects.equals("Hi", "Hi") == true
Objects.equals("Hi", null) == false
Objects.equals(null, "Hi") == false
Objects.equals("Hi", "Ho") == false
o1 - the first object to compareo2 - the second object to comparetrue if and only if
both objects are null or equal according to
equals invoked on the
first objectCopyright © 2009-2014 JGoodies Software GmbH. All Rights Reserved.