Class StepCount
-
- All Implemented Interfaces:
-
java.util.function.Predicate
public final class StepCount<T extends Object, P extends Position<P>> implements Predicate<Environment<T, P>>
Terminates the simulation after a given number of steps. If the simulation is uninitialized (thus, the environment returns null when asked for the simulation), this predicate always returns false.
-
-
Method Summary
Modifier and Type Method Description final Long
getLastStep()
Boolean
test(Environment<T, P> environment)
-
-
Constructor Detail
-
StepCount
StepCount(Long lastStep)
- Parameters:
lastStep
- the last step.
-
-
Method Detail
-
getLastStep
final Long getLastStep()
-
test
Boolean test(Environment<T, P> environment)
-
-
-
-