public class MultiStep extends java.lang.Object implements Steppable
The count down (if we're doing that) can be reset by calling resetCountdown(). MultiStep is properly synchronized.
If you're using MultiStep to schedule an agent to occur repeating over time, you'd probably do better to use Schedule.scheduleRepeating(...) instead.
Constructor and Description |
---|
MultiStep(Steppable step,
int n,
boolean countdown)
If countdown is true, then we call step.step(...) once every N times we're stepped.
|
Modifier and Type | Method and Description |
---|---|
void |
resetCountdown()
If we're counting down, then this resets the countdown.
|
void |
resetCountdown(int val)
If we're counting down, then this resets the countdown to the given value, which should be > 0 and <= n.
|
void |
step(SimState state) |
public MultiStep(Steppable step, int n, boolean countdown)
public void resetCountdown()
public void resetCountdown(int val)