Class RunParameterSetter

java.lang.Object
repast.simphony.parameter.RunParameterSetter
All Implemented Interfaces:
ParameterSetter

public class RunParameterSetter extends Object implements ParameterSetter
A ParameterSetter that signifies a set of nested parameters being executed multiple times. This will run its nested initializers the number of times specified in its totalRuns argument.
Author:
Jerry Vos
  • Field Details

    • runNumber

      protected int runNumber
    • totalRuns

      protected int totalRuns
  • Constructor Details

    • RunParameterSetter

      public RunParameterSetter(int totalRuns)
      The number of times this and its nested parameters should be run.
      Parameters:
      totalRuns - number of times to run through the parameters
  • Method Details

    • reset

      public void reset(Parameters params)
      Resets the run count to 0.
      Specified by:
      reset in interface ParameterSetter
    • atEnd

      public boolean atEnd()
      True if we've run totalRuns times.
      Specified by:
      atEnd in interface ParameterSetter
      Returns:
      if we've ran enough times
    • next

      public void next(Parameters params)
      Increments the run number and calls the super's next method.
      Specified by:
      next in interface ParameterSetter
      Parameters:
      params - unused but passed to the super
    • getTotalRuns

      public int getTotalRuns()
    • setTotalRuns

      public void setTotalRuns(int totalRuns)
    • toString

      public String toString()
      Overrides:
      toString in class Object