{@inheritDoc}
(int numSteps, Closure closure)
| 631 | * {@inheritDoc} |
| 632 | */ |
| 633 | @Override |
| 634 | public void step(int numSteps, Closure closure) { |
| 635 | if (numSteps == 0 && compareTo(from, to) == 0) { |
| 636 | return; // from == to and step == 0, nothing to do, so return |
| 637 | } |
| 638 | final StepIterator iter = new StepIterator(this, multiply(numSteps, stepSize)); |
| 639 | while (iter.hasNext()) { |
| 640 | closure.call(iter.next()); |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | /** |
| 645 | * {@inheritDoc} |