Class ForLoop

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractListGenerator>, SizeOfHandler, Serializable

    public class ForLoop
    extends AbstractListGenerator
    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)

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -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
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_LoopLower

        protected int m_LoopLower
        the lower bound of the for loop.
      • m_LoopUpper

        protected int m_LoopUpper
        the upper bound of the for loop.
      • m_LoopStep

        protected int m_LoopStep
        the step size.
    • Constructor Detail

      • ForLoop

        public ForLoop()
    • Method Detail

      • setLoopLower

        public void setLoopLower​(int value)
        Sets the lower bound of the loop.
        Parameters:
        value - the lower bound
      • getLoopLower

        public int getLoopLower()
        Returns the lower bound of the loop.
        Returns:
        the lower bound
      • loopLowerTipText

        public String loopLowerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setLoopUpper

        public void setLoopUpper​(int value)
        Sets the upper bound of the loop.
        Parameters:
        value - the upper bound
      • getLoopUpper

        public int getLoopUpper()
        Returns the upper bound of the loop.
        Returns:
        the upper bound
      • loopUpperTipText

        public String loopUpperTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setLoopStep

        public void setLoopStep​(int value)
        Sets the step size.
        Parameters:
        value - the step size
      • getLoopStep

        public int getLoopStep()
        Returns the step size.
        Returns:
        the step size
      • loopStepTipText

        public String loopStepTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.