Package repast.simphony.parameter
Class RunParameterSetter
- java.lang.Object
-
- repast.simphony.parameter.RunParameterSetter
-
- All Implemented Interfaces:
ParameterSetter
public class RunParameterSetter extends Object implements ParameterSetter
AParameterSetter
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
-
-
Constructor Summary
Constructors Constructor Description RunParameterSetter(int totalRuns)
The number of times this and its nested parameters should be run.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
atEnd()
True if we've run totalRuns times.int
getTotalRuns()
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)
String
toString()
-
-
-
Method Detail
-
reset
public void reset(Parameters params)
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
public void next(Parameters params)
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)
-
-