Package ca.uqac.lif.cep.fsm
Class MooreMachine.Transition
java.lang.Object
ca.uqac.lif.cep.fsm.MooreMachine.Transition
- All Implemented Interfaces:
ca.uqac.lif.cep.Duplicable
- Direct Known Subclasses:
FunctionTransition,ProcessorTransition
- Enclosing class:
MooreMachine
Represents a transition in the Moore machine
- Author:
- Sylvain Hallé
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new transitionCopies a transition from another transition -
Method Summary
Modifier and TypeMethodDescriptionfinal MooreMachine.Transitionduplicate(boolean with_state) intGets the destination (i.e.booleanDetermines if the transition fires for the given inputvoidmodifyContext(Object[] inputs, Object[] outputs, MooreMachine machine) Modifies the context of the state machinevoidreset()Resets the state of the transition
-
Constructor Details
-
Transition
public Transition()Creates a new transition -
Transition
Copies a transition from another transition- Parameters:
t- The transition to copy from
-
-
Method Details
-
isFired
Determines if the transition fires for the given input- Parameters:
inputs- The input eventscontext- The context for the evaluation- Returns:
trueif the transition fires,falseotherwise
-
reset
public void reset()Resets the state of the transition -
modifyContext
Modifies the context of the state machine- Parameters:
inputs- The input parameters to the context assignmentoutputs- The output parameters to the context assignmentmachine- The Moore machine whose context is to be modified
-
getDestination
public int getDestination()Gets the destination (i.e. target state) of that transition- Returns:
- The destination state
-
duplicate
- Specified by:
duplicatein interfaceca.uqac.lif.cep.Duplicable
-
duplicate
- Specified by:
duplicatein interfaceca.uqac.lif.cep.Duplicable
-