1 | package de.uka.ipd.sdq.simulation.abstractsimengine; |
2 | |
3 | /** |
4 | * A simulation element is a named object which is a part of the simulation model and, as such, |
5 | * needs access to the implementation class of the {@link ISimulationModel} interface. |
6 | * |
7 | * @author Steffen Becker (this code has been factored out from SimuCom) |
8 | * @author Philipp Merkle |
9 | * |
10 | * @param <M> |
11 | * the type of the simulation model |
12 | */ |
13 | public abstract class SimulationElement { |
14 | |
15 | private String name; |
16 | private ISimulationModel model; |
17 | |
18 | public SimulationElement(ISimulationModel model, String name) { |
19 | this.model = model; |
20 | this.name = name; |
21 | } |
22 | |
23 | /** |
24 | * Returns the name of this simulation element. |
25 | */ |
26 | public String getName() { |
27 | return name; |
28 | } |
29 | |
30 | /** |
31 | * Returns the simulation model. |
32 | */ |
33 | public ISimulationModel getModel() { |
34 | return this.model; |
35 | } |
36 | |
37 | } |