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
public static class MooreMachine.Transition extends java.lang.Object implements ca.uqac.lif.cep.Duplicable
Represents a transition in the Moore machine- Author:
- Sylvain Hallé
-
-
Constructor Summary
Constructors Constructor Description Transition()
Creates a new transitionTransition(MooreMachine.Transition t)
Copies a transition from another transition
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MooreMachine.Transition
duplicate()
MooreMachine.Transition
duplicate(boolean with_state)
int
getDestination()
Gets the destination (i.e.boolean
isFired(java.lang.Object[] inputs, ca.uqac.lif.cep.Context context)
Determines if the transition fires for the given inputvoid
modifyContext(java.lang.Object[] inputs, java.lang.Object[] outputs, MooreMachine machine)
Modifies the context of the state machinevoid
reset()
Resets the state of the transition
-
-
-
Constructor Detail
-
Transition
public Transition()
Creates a new transition
-
Transition
public Transition(MooreMachine.Transition t)
Copies a transition from another transition- Parameters:
t
- The transition to copy from
-
-
Method Detail
-
isFired
public boolean isFired(java.lang.Object[] inputs, ca.uqac.lif.cep.Context context)
Determines if the transition fires for the given input- Parameters:
inputs
- The input eventscontext
- The context for the evaluation- Returns:
true
if the transition fires,false
otherwise
-
reset
public void reset()
Resets the state of the transition
-
modifyContext
public void modifyContext(java.lang.Object[] inputs, java.lang.Object[] outputs, MooreMachine machine)
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
public final MooreMachine.Transition duplicate()
- Specified by:
duplicate
in interfaceca.uqac.lif.cep.Duplicable
-
duplicate
public MooreMachine.Transition duplicate(boolean with_state)
- Specified by:
duplicate
in interfaceca.uqac.lif.cep.Duplicable
-
-