Package net.sf.jasperreports.engine.util
Class JRCloneUtils
java.lang.Object
net.sf.jasperreports.engine.util.JRCloneUtils
Cloning related utility methods.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends JRCloneable>
T[]cloneArray
(T[] items) Clones a list of objects.static <T extends JRCloneable>
List<T> Clones a list of objects.static <T extends JRCloneable>
TnullSafeClone
(T original) Clones an object after checking whether the argument is null.
-
Method Details
-
nullSafeClone
Clones an object after checking whether the argument is null.- Parameters:
original
- the object to be cloned- Returns:
- a clone of the argument, or
null
if the argument wasnull
-
cloneList
Clones a list of objects. The list elements are assumed to implementJRCloneable
.- Parameters:
items
- the list to clone- Returns:
- a new list which contains clones of the elements in the original list
-
cloneArray
Clones a list of objects. The list elements are assumed to implementJRCloneable
.- Parameters:
items
- the list to clone- Returns:
- a new list which contains clones of the elements in the original list
-