Class ArrayAppend

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class ArrayAppend
    extends Transformer
    An actor that appends ArrayTokens together. This actor has a single input multiport, and a single output port. The types on the input and the output port must both be the same array type. During each firing, this actor reads up to one ArrayToken from each channel of the input port and creates an ArrayToken of the same type on the output port. If no token is available on a particular channel, then there will be no contribution to the output. The output is an array of length equal to the sum of the lengths of the input arrays (which may be zero if either there are no input arrays or the lengths of the input arrays are all zero).
    Since:
    Ptolemy II 1.0
    Version:
    $Id$
    Author:
    Steve Neuendorffer
    Pt.AcceptedRating:
    Green (cxh)
    Pt.ProposedRating:
    Green (celaine)
    • Method Detail

      • fire

        public void fire()
                  throws IllegalActionException
        Consume at most one ArrayToken from each channel of the input port and produce a single ArrayToken on the output port that contains all of the tokens contained in all of the arrays read from the input. If all input arrays are empty, or if there are no input arrays, then output an empty array of the appropriate type.
        Specified by:
        fire in interface Executable
        Overrides:
        fire in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - If a runtime type conflict occurs, or if there are no input channels.