public final class ObjectUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
clone(Object object)
Returns a clone of the specified object, if it can be cloned, otherwise
throws a CloneNotSupportedException.
|
static Collection |
deepClone(Collection collection)
Returns a new collection containing clones of all the items in the
specified collection.
|
static boolean |
equal(Object o1,
Object o2)
Returns
true if the two objects are equal OR both
null . |
static int |
hashCode(Object object)
Returns a hash code for an object, or zero if the object is
null . |
public static boolean equal(Object o1, Object o2)
true
if the two objects are equal OR both
null
.o1
- object 1 (null
permitted).o2
- object 2 (null
permitted).true
or false
.public static int hashCode(Object object)
null
.object
- the object (null
permitted).null
).public static Object clone(Object object) throws CloneNotSupportedException
object
- the object to clone (null
not permitted).CloneNotSupportedException
- if the object cannot be cloned.public static Collection deepClone(Collection collection) throws CloneNotSupportedException
collection
- the collection (null
not permitted).CloneNotSupportedException
- if any of the items in the collection
cannot be cloned.Copyright © 2001–2017 JFree.org. All rights reserved.