public abstract class AlternativeStepsSupportedSimulator extends DecoratorSimulator
Constructor and Description |
---|
AlternativeStepsSupportedSimulator(ISimulator decorated)
Creates a new AlternativeStepsSupportedSimulator which will use sim as
decorated field, as stated in Singleton pattern
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
alternateStep()
Executes an alternate step and returns if the step has been properly
executed
|
abstract int |
countAlternatives()
If possible, counts the number of alternative steps available for the
simulator
|
boolean |
supportsAlternateSteps()
In AlternativeStepsSupportedSimulator instances, this method always
returns true
|
cleanPreviousConfigurations, getCurrentConfig, getInfoChannel, getPsystem, getTime, getVerbosity, isFinished, isTimed, reset, run, runSteps, runUntilTimeOut, runUntilTimeOutorSteps, setCurrentConfig, setInfoChannel, setPsystem, setTimed, setVerbosity, step, stepBack, stepsBackAvailable, stopThread, supportsStepBack
public AlternativeStepsSupportedSimulator(ISimulator decorated)
decorated
- the decorated attribute this class will rely onpublic final boolean supportsAlternateSteps()
supportsAlternateSteps
in interface ISimulator
supportsAlternateSteps
in class DecoratorSimulator
DecoratorSimulator.supportsAlternateSteps()
public abstract boolean alternateStep()
alternateStep
in interface ISimulator
alternateStep
in class DecoratorSimulator
ISimulator.alternateStep()
public abstract int countAlternatives() throws java.lang.UnsupportedOperationException
countAlternatives
in interface ISimulator
countAlternatives
in class DecoratorSimulator
java.lang.UnsupportedOperationException
- if alternate steps are not supportedISimulator.countAlternatives()