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.DuplicableRepresents 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.Transitionduplicate()MooreMachine.Transitionduplicate(boolean with_state)intgetDestination()Gets the destination (i.e.booleanisFired(java.lang.Object[] inputs, ca.uqac.lif.cep.Context context)Determines if the transition fires for the given inputvoidmodifyContext(java.lang.Object[] inputs, java.lang.Object[] outputs, MooreMachine machine)Modifies the context of the state machinevoidreset()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:
trueif the transition fires,falseotherwise
-
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:
duplicatein interfaceca.uqac.lif.cep.Duplicable
-
duplicate
public MooreMachine.Transition duplicate(boolean with_state)
- Specified by:
duplicatein interfaceca.uqac.lif.cep.Duplicable
-
-