Package repast.simphony.parameter
Class RunParameterSetter
java.lang.Object
repast.simphony.parameter.RunParameterSetter
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRunParameterSetter(int totalRuns) The number of times this and its nested parameters should be run. -
Method Summary
Modifier and TypeMethodDescriptionbooleanatEnd()True if we've run totalRuns times.intvoidnext(Parameters params) Increments the run number and calls the super's next method.voidreset(Parameters params) Resets the run count to 0.voidsetTotalRuns(int totalRuns) toString()
-
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
Resets the run count to 0.- Specified by:
resetin interfaceParameterSetter
-
atEnd
public boolean atEnd()True if we've run totalRuns times.- Specified by:
atEndin interfaceParameterSetter- Returns:
- if we've ran enough times
-
next
Increments the run number and calls the super's next method.- Specified by:
nextin interfaceParameterSetter- Parameters:
params- unused but passed to the super
-
getTotalRuns
public int getTotalRuns() -
setTotalRuns
public void setTotalRuns(int totalRuns) -
toString
-