public class StepBackSupportedSimulator extends DecoratorSimulator
Constructor and Description |
---|
StepBackSupportedSimulator(ISimulator sim)
Creates a new StepBackSupportedSimulator instance which will wrap sim
|
Modifier and Type | Method and Description |
---|---|
void |
cleanPreviousConfigurations()
Cleans the configurations previously reached
|
void |
reset()
Resets the simulator to the initial configuration
|
boolean |
step()
Takes one step of simulation and generate a new configuration
|
boolean |
stepBack()
Takes one step back
|
boolean |
stepsBackAvailable()
Returns a boolean representing if there are any step back which the simulator can go back to
|
boolean |
supportsStepBack()
Returns true, because StepBackSupportedSimulator
supports step back
|
alternateStep, countAlternatives, getCurrentConfig, getInfoChannel, getPsystem, getTime, getVerbosity, isFinished, isTimed, run, runSteps, runUntilTimeOut, runUntilTimeOutorSteps, setCurrentConfig, setInfoChannel, setPsystem, setTimed, setVerbosity, stopThread, supportsAlternateSteps
public StepBackSupportedSimulator(ISimulator sim)
sim
- the decorated field according to Decorator patternpublic final boolean supportsStepBack()
supportsStepBack
in interface ISimulator
supportsStepBack
in class DecoratorSimulator
ISimulator.supportsStepBack()
public final boolean step() throws PlinguaCoreException
ISimulator
step
in interface ISimulator
step
in class DecoratorSimulator
PlinguaCoreException
- if a semantic error occursDecoratorSimulator.step()
public boolean stepsBackAvailable()
ISimulator
stepsBackAvailable
in interface ISimulator
stepsBackAvailable
in class DecoratorSimulator
DecoratorSimulator.stepsBackAvailable()
public void cleanPreviousConfigurations()
ISimulator
cleanPreviousConfigurations
in interface ISimulator
cleanPreviousConfigurations
in class DecoratorSimulator
DecoratorSimulator.cleanPreviousConfigurations()
public boolean stepBack()
ISimulator
stepBack
in interface ISimulator
stepBack
in class DecoratorSimulator
DecoratorSimulator.stepBack()
public void reset()
ISimulator
reset
in interface ISimulator
reset
in class DecoratorSimulator
DecoratorSimulator.reset()