SimulationManager

public interface SimulationManager

Management tool for handling multiple Simulators.

Author:Kyle M. Douglass

Methods

addSimulator

public void addSimulator(Simulator simulator)

Adds a simulation to the manager.

Parameters:
  • simulator – The simulation to add to the manager.

getIds

public List<Integer> getIds()

Returns a list of simulation IDs currently managed by this Manager. A simulation manager is a Singleton; there is only one.

Returns:A list of simulation ID numbers.

getMostRecentMicroscope

public Microscope getMostRecentMicroscope()

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 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.

Returns:A copy of the Microscope object null.

getSimulator

public Simulator getSimulator(int id)

Returns a reference to the simulator corresponding to the ID.

Parameters:
  • id – The ID number of a simulation.
Returns:

A reference to the Simulator.

removeSimulator

public void removeSimulator(int id)

Removes a Simulator from the manager.

Parameters:
  • id – The ID number of a simulation to remove.