.. java:import:: ch.epfl.leb.sass.models Microscope .. java:import:: ch.epfl.leb.sass.simulator Simulator .. java:import:: ch.epfl.leb.sass.simulator SimulationManager .. java:import:: java.util List .. java:import:: java.util Collections .. java:import:: java.util.concurrent ConcurrentHashMap DefaultSimulationManager ======================== .. java:package:: ch.epfl.leb.sass.simulator.internal :noindex: .. java:type:: public class DefaultSimulationManager implements SimulationManager A default implementation of the SimulationManager class. :author: Kyle M. Douglass Constructors ------------ DefaultSimulationManager ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:constructor:: public DefaultSimulationManager() :outertype: DefaultSimulationManager Default constructor. DefaultSimulationManager ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:constructor:: public DefaultSimulationManager(ConcurrentHashMap simulations) :outertype: DefaultSimulationManager Adds a table of simulations to a new SimulationManager instance. :param simulations: A table of simulations to add to the new instance. Methods ------- addSimulator ^^^^^^^^^^^^ .. java:method:: public void addSimulator(Simulator simulator) :outertype: DefaultSimulationManager Adds a simulation to the manager. :param The: simulation to add to the manager. getIds ^^^^^^ .. java:method:: @Override public List getIds() :outertype: DefaultSimulationManager Returns the list of simulation IDs managed by the manager. :return: The list of simulation IDs managed by the manager. getMostRecentMicroscope ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public Microscope getMostRecentMicroscope() :outertype: DefaultSimulationManager Returns the most recent microscope that was used to create a simulation. This method serves as a sort of cache for remembering the most recently created \ :java:ref:`Microscope `\ object. Its purpose is to allow for easy generation of new Simulators. This method will return null if the SimulatorManager has never managed a simulation. :return: A copy of the Microscope object or null. getSimulator ^^^^^^^^^^^^ .. java:method:: @Override public Simulator getSimulator(int id) :outertype: DefaultSimulationManager Returns a reference to the simulator corresponding to the ID. :param id: The ID number of a simulation. :return: A reference to the Simulator. removeSimulator ^^^^^^^^^^^^^^^ .. java:method:: @Override public void removeSimulator(int id) :outertype: DefaultSimulationManager Removes a Simulator from the manager. :param id: The ID number of a simulation to remove.