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
-
Constructor Summary
ConstructorDescriptionRunParameterSetter
(int totalRuns) The number of times this and its nested parameters should be run. -
Method Summary
Modifier and TypeMethodDescriptionboolean
atEnd()
True if we've run totalRuns times.int
void
next
(Parameters params) Increments the run number and calls the super's next method.void
reset
(Parameters params) Resets the run count to 0.void
setTotalRuns
(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:
reset
in interfaceParameterSetter
-
atEnd
public boolean atEnd()True if we've run totalRuns times.- Specified by:
atEnd
in interfaceParameterSetter
- Returns:
- if we've ran enough times
-
next
Increments the run number and calls the super's next method.- Specified by:
next
in interfaceParameterSetter
- Parameters:
params
- unused but passed to the super
-
getTotalRuns
public int getTotalRuns() -
setTotalRuns
public void setTotalRuns(int totalRuns) -
toString
-