Class IterateOverArray.IteratePort

  • All Implemented Interfaces:
    java.lang.Cloneable, HasTypeConstraints, Typeable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
    Enclosing class:
    IterateOverArray

    public static class IterateOverArray.IteratePort
    extends MirrorPort
    This is a specialized port for IterateOverArray. If the container is an instance of IterateOverArray, then it handles type conversions between the array types of the ports of the enclosing IterateOverArray actor and the scalar types (or arrays with one less dimension) of the actor that are contained. It has a notion of an "associated port," and ensures that changes to the status of one port (whether it is input, output, or multiport) are reflected in the associated port.
    • Constructor Detail

      • IteratePort

        public IteratePort​(Workspace workspace)
                    throws IllegalActionException
        Construct a port in the specified workspace with an empty string as a name. You can then change the name with setName(). If the workspace argument is null, then use the default workspace. The object is added to the workspace directory. Increment the version number of the workspace.
        Parameters:
        workspace - The workspace that will list the port.
        Throws:
        IllegalActionException - If port parameters cannot be initialized.
    • Method Detail

      • convert

        public Token convert​(Token token)
                      throws IllegalActionException
        Override the base class to convert the token to the element type rather than to the type of the port, unless the port is of type GENERAL, in which case, no conversion is necessary.
        Overrides:
        convert in class TypedIOPort
        Parameters:
        token - The token to convert.
        Returns:
        The converted token.
        Throws:
        IllegalActionException - If the conversion is invalid.