Package org.opentrafficsim.core.network
Class OTSNetworkUtils
- java.lang.Object
-
- org.opentrafficsim.core.network.OTSNetworkUtils
-
public final class OTSNetworkUtils extends Object
OTSNetworkUtils Static methods that make a deep clone of an OTSNetwork, or destroy an OTSNetwork.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 OTSNetworkclone(OTSNetwork network, String newId, OTSSimulatorInterface newSimulator)Clone an OTSNetwork.static voiddestroy(OTSNetwork network)Remove all objects and animation in an OTSNetwork.
-
-
-
Method Detail
-
clone
public static OTSNetwork clone(OTSNetwork network, String newId, OTSSimulatorInterface newSimulator) throws NetworkException
Clone an OTSNetwork.- Parameters:
network- OTSNetwork; the network to clonenewId- String; the new id of the networknewSimulator- OTSSimulatorInterface; the new simulator for this network- Returns:
- OTSNetwork; a clone of the network
- Throws:
NetworkException- in case the cloning fails
-
destroy
public static void destroy(OTSNetwork network)
Remove all objects and animation in an OTSNetwork.- Parameters:
network- OTSNetwork; the network to destroy
-
-