Class ObjectUtils
java.lang.Object
org.jfree.chart.util.ObjectUtils
A collection of useful static utility methods for handling classes and object
instantiation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectReturns a clone of the specified object, if it can be cloned, otherwise throws a CloneNotSupportedException.static CollectiondeepClone(Collection collection) Returns a new collection containing clones of all the items in the specified collection.static booleanDeprecated.Use Objects.equals() from the JDK.static intReturns a hash code for an object, or zero if the object isnull.
-
Method Details
-
equal
-
hashCode
-
clone
Returns a clone of the specified object, if it can be cloned, otherwise throws a CloneNotSupportedException.- Parameters:
object- the object to clone (nullnot permitted).- Returns:
- A clone of the specified object.
- Throws:
CloneNotSupportedException- if the object cannot be cloned.
-
deepClone
Returns a new collection containing clones of all the items in the specified collection.- Parameters:
collection- the collection (nullnot permitted).- Returns:
- A new collection containing clones of all the items in the specified collection.
- Throws:
CloneNotSupportedException- if any of the items in the collection cannot be cloned.
-