de.xabsl.jxabsl.behavior
Class Option
java.lang.Object
de.xabsl.jxabsl.symbols.NamedItem
de.xabsl.jxabsl.behavior.Behavior
de.xabsl.jxabsl.behavior.Option
public class Option
- extends Behavior
Represents a single option
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
activeState
protected State activeState
initialState
protected State initialState
timeFunction
protected TimeFunction timeFunction
states
protected java.util.LinkedHashMap<java.lang.String,State> states
Option
public Option(java.lang.String name,
InputSource input,
DebugMessages debug,
Symbols symbols,
TimeFunction timeFunction)
- Constructor. Does not create the option.
- Parameters:
name
- The name of the option. For debugging purposes.input
- An input source for the intermediate code. It must be opened
and read until A position where an option starts.debug
- Print debugging messagessymbols
- All available symbolstimeFunction
- a pointer to a function that returns the system time in ms.
create
public void create(InputSource input,
java.util.Map<java.lang.String,Option> options,
Engine engine)
throws IntermediateCodeMalformedException
- Creates the option and its states from the intermediate code.
- Parameters:
input
- An input source for the intermediate code. It must be opened
and read until a position where an option starts.options
- All other optionsengine
- The engine that provides symbols and basic behaviors
- Throws:
IntermediateCodeMalformedException
getOptionReachedATargetState
public boolean getOptionReachedATargetState()
- if a target state was reached
execute
public void execute()
- Description copied from class:
Behavior
- executes the behavior
- Specified by:
execute
in class Behavior
getStates
public java.util.LinkedHashMap<java.lang.String,State> getStates()
getActiveState
public State getActiveState()