Class ForLoop

  • All Implemented Interfaces:
    AdditionalInformationHandler, ArrayProvider, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ArrayProvider, ErrorHandler, OutputProducer, Serializable, Comparable

    public class ForLoop
    extends AbstractForLoop
    implements ArrayProvider
    Emulates the following for-loop for integer IDs:
    - positive step size:
    for (int i = lower; i <= upper; i += step)
    - negative step size:
    for (int i = upper; i >= lower; i += step)

    The integers can be output as a single array as well.

    Input/output:
    - generates:
       java.lang.Integer


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: ForLoop
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console.
        default: false
     
    -lower <int> (property: loopLower)
        The lower bound of the loop (= the first value).
        default: 1
     
    -upper <int> (property: loopUpper)
        The upper bound of the loop.
        default: 10
     
    -step <int> (property: loopStep)
        The step size of the loop.
        default: 1
     
    -output-array <boolean> (property: outputArray)
        Whether to output the integers one-by-one or as array.
        default: false
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form