Class Cloner
- java.lang.Object
-
- org.opentrafficsim.road.network.factory.xml.utils.Cloner
-
public final class Cloner extends Object
Cloner makes a deep clone of any serializable object with serializable fields.Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tclone(T object)Clone an object that is serializable and that has serializable fields.static ROADLAYOUTcloneRoadLayout(BASICROADLAYOUT in)Clone the BASICROADLAYOUT, as not all DJUNIT types are serializable...
-
-
-
Method Detail
-
clone
public static <T> T clone(T object) throws XmlParserExceptionClone an object that is serializable and that has serializable fields.- Type Parameters:
T- the type of the object to clone- Parameters:
object- T; the object to clone- Returns:
- the clone of the object
- Throws:
XmlParserException- on cloning error
-
cloneRoadLayout
public static ROADLAYOUT cloneRoadLayout(BASICROADLAYOUT in)
Clone the BASICROADLAYOUT, as not all DJUNIT types are serializable...- Parameters:
in- BASICROADLAYOUT; the object to clone- Returns:
- the cloned object
-
-