Class FunctionTransition

  • All Implemented Interfaces:
    ca.uqac.lif.cep.Duplicable
    Direct Known Subclasses:
    TransitionOtherwise

    public class FunctionTransition
    extends MooreMachine.Transition
    Transition for a Moore Machine where the guard is a function returning a boolean, and the context modification is a list of ContextAssignments.
    Author:
    Sylvain Hallé
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<ca.uqac.lif.cep.functions.ContextAssignment> m_assignments  
      protected int m_destination  
      protected ca.uqac.lif.cep.functions.Function m_function  
    • Constructor Summary

      Constructors 
      Constructor Description
      FunctionTransition​(FunctionTransition t)  
      FunctionTransition​(ca.uqac.lif.cep.functions.Function function, int destination)  
      FunctionTransition​(ca.uqac.lif.cep.functions.Function function, int destination, ca.uqac.lif.cep.functions.ContextAssignment asg)  
      FunctionTransition​(ca.uqac.lif.cep.functions.Function function, int destination, ca.uqac.lif.cep.functions.ContextAssignment... asgs)  
    • Field Detail

      • m_function

        protected ca.uqac.lif.cep.functions.Function m_function
      • m_assignments

        protected java.util.List<ca.uqac.lif.cep.functions.ContextAssignment> m_assignments
      • m_destination

        protected int m_destination
    • Constructor Detail

      • FunctionTransition

        public FunctionTransition​(ca.uqac.lif.cep.functions.Function function,
                                  int destination,
                                  ca.uqac.lif.cep.functions.ContextAssignment asg)
      • FunctionTransition

        public FunctionTransition​(ca.uqac.lif.cep.functions.Function function,
                                  int destination,
                                  ca.uqac.lif.cep.functions.ContextAssignment... asgs)
      • FunctionTransition

        public FunctionTransition​(ca.uqac.lif.cep.functions.Function function,
                                  int destination)
    • Method Detail

      • isFired

        public boolean isFired​(java.lang.Object[] input,
                               ca.uqac.lif.cep.Context context)
        Description copied from class: MooreMachine.Transition
        Determines if the transition fires for the given input
        Overrides:
        isFired in class MooreMachine.Transition
        Parameters:
        input - The input events
        context - The context for the evaluation
        Returns:
        true if the transition fires, false otherwise
      • modifyContext

        public void modifyContext​(java.lang.Object[] inputs,
                                  java.lang.Object[] outputs,
                                  MooreMachine machine)
        Description copied from class: MooreMachine.Transition
        Modifies the context of the state machine
        Overrides:
        modifyContext in class MooreMachine.Transition
        Parameters:
        inputs - The input parameters to the context assignment
        outputs - The output parameters to the context assignment
        machine - The Moore machine whose context is to be modified
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object