Class Cloner


  • public final class Cloner
    extends java.lang.Object
    Cloner makes a deep clone of any serializable object with serializable fields.

    Copyright (c) 2003-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
    Author:
    Alexander Verbraeck
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T clone​(T object)
      Clone an object that is serializable and that has serializable fields.
      static ROADLAYOUT cloneRoadLayout​(BASICROADLAYOUT in)
      Clone the BASICROADLAYOUT, as not all DJUNIT types are serializable...
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • clone

        public static <T> T clone​(T object)
                           throws XmlParserException
        Clone an object that is serializable and that has serializable fields.
        Type Parameters:
        T - the type of the object to clone
        Parameters:
        object - 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 - the object to clone
        Returns:
        the cloned object