Class Combine

    • Method Detail

      • isStrict

        public boolean isStrict()
        This actor must be *NON-strict* because it must not wait for more than one input within an SR director iteration.
        Specified by:
        isStrict in interface Executable
        Overrides:
        isStrict in class AtomicActor<TypedIOPort>
        Returns:
        False if this actor does not need to be provided with inputs to fire.
      • prefire

        public boolean prefire()
                        throws IllegalActionException
        Description copied from class: AtomicActor
        Return true. Derived classes override this method to define operations to be performed at the beginning of every iteration of its execution, prior the invocation of the fire() method. Derived classes may also use it to check preconditions for an iteration, if there are any.
        Specified by:
        prefire in interface Executable
        Overrides:
        prefire in class AtomicActor<TypedIOPort>
        Returns:
        True if this actor is ready for firing, false otherwise.
        Throws:
        IllegalActionException - Not thrown in this base class.
      • postfire

        public boolean postfire()
                         throws IllegalActionException
        Description copied from class: AtomicActor
        Return true, unless stop() has been called, in which case, return false. Derived classes override this method to define operations to be performed at the end of every iteration of its execution, after one invocation of the prefire() method and any number of invocations of the fire() method. This method typically wraps up an iteration, which may involve updating local state. In derived classes, this method returns false to indicate that this actor should not be fired again.
        Specified by:
        postfire in interface Executable
        Overrides:
        postfire in class AtomicActor<TypedIOPort>
        Returns:
        True if execution can continue into the next iteration.
        Throws:
        IllegalActionException - Not thrown in this base class.
      • _updateFunction

        protected int _updateFunction​(int in,
                                      int old)
                               throws IllegalActionException
        Calculate the function on the given arguments.
        Parameters:
        in - The new input value. Should never be null.
        old - The old result value, or null if there is none.
        Returns:
        The result of applying the function.
        Throws:
        IllegalActionException - If thrown by BooleanToken operations.
      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        Override the base class to determine which function is being specified. Read the value of the function attribute and set the cached value appropriately.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If the function is not recognized.