|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.jobs.InternalJob
org.eclipse.core.runtime.jobs.Job
org.eclipse.ohf.stem.jobs.simulation.Simulation
public class Simulation
This class implements the main simulation logic of the STEM system. It runs in the background as a seperate "Job" in eclipse.
Field Summary |
---|
Fields inherited from class org.eclipse.core.runtime.jobs.Job |
---|
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING |
Fields inherited from interface org.eclipse.ohf.stem.jobs.simulation.ISimulation |
---|
TOTAL_WORK |
Constructor Summary | |
---|---|
Simulation(Scenario scenario)
Constructor |
|
Simulation(java.lang.String title)
|
Method Summary | |
---|---|
void |
addSimulationListener(ISimulationListener listener)
|
java.lang.String |
getNameWithSequenceNumber()
|
Scenario |
getScenario()
|
int |
getSequenceNumber()
|
SimulationState |
getSimulationState()
|
void |
pause()
Pause the simulation |
void |
removeSimulationListener(ISimulationListener listener)
|
void |
reset()
Reset the simulation. |
void |
run()
Start running the simulation. |
void |
setSequenceNumber(int sequenceNumber)
|
void |
step()
Step the simulation one step/cycle if it hasn't already ended |
void |
stop()
Stop the simulation; |
java.lang.String |
toString()
|
Methods inherited from class org.eclipse.core.runtime.jobs.Job |
---|
addJobChangeListener, belongsTo, cancel, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, wakeUp, wakeUp |
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob |
---|
compareTo |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
---|
getAdapter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.ohf.stem.jobs.simulation.ISimulation |
---|
getName |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Constructor Detail |
---|
public Simulation(java.lang.String title)
title
- the title of the simulation.public Simulation(Scenario scenario)
scenario
- the Scenario to simulateMethod Detail |
---|
public final SimulationState getSimulationState()
getSimulationState
in interface ISimulation
public int getSequenceNumber()
getSequenceNumber
in interface ISimulation
ISimulation.getSequenceNumber()
public void setSequenceNumber(int sequenceNumber)
setSequenceNumber
in interface ISimulation
sequenceNumber
- The sequence number of the simulationISimulation.setSequenceNumber(int)
public java.lang.String getNameWithSequenceNumber()
getNameWithSequenceNumber
in interface ISimulation
ISimulation.getNameWithSequenceNumber()
public final void run()
run
in interface ISimulation
public final void pause()
pause
in interface ISimulation
public final void reset()
reset
in interface ISimulation
public final void step()
step
in interface ISimulation
public final void stop()
stop
in interface ISimulation
public final Scenario getScenario()
getScenario
in interface ISimulation
public void addSimulationListener(ISimulationListener listener)
addSimulationListener
in interface ISimulation
ISimulation.addSimulationListener(org.eclipse.ohf.stem.jobs.simulation.ISimulationListener)
public void removeSimulationListener(ISimulationListener listener)
removeSimulationListener
in interface ISimulation
ISimulation.removeSimulationListener(org.eclipse.ohf.stem.jobs.simulation.ISimulationListener)
public java.lang.String toString()
toString
in class org.eclipse.core.internal.jobs.InternalJob
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |