java.lang.Object
org.jfree.chart.util.CloneUtils
Utilities for cloning.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Returns a clone of the specified object, if it can be cloned, otherwise throws aCloneNotSupportedException
.static List<?>
Returns a list containing cloned copies of the items in the source list.static Map
cloneMapValues
(Map source) Returns a new map that contains the same keys and cloned copied of the values.
-
Constructor Details
-
CloneUtils
public CloneUtils()
-
-
Method Details
-
clone
Returns a clone of the specified object, if it can be cloned, otherwise throws aCloneNotSupportedException
.- Parameters:
object
- the object to clone (null
not permitted).- Returns:
- A clone of the specified object.
- Throws:
CloneNotSupportedException
- if the object cannot be cloned.
-
cloneList
Returns a list containing cloned copies of the items in the source list.- Parameters:
source
- the source list (null
not permitted).- Returns:
- A new list.
-
cloneMapValues
Returns a new map that contains the same keys and cloned copied of the values.- Parameters:
source
- the source map (null
not permitted).- Returns:
- A new map.
-