MCPcopy Index your code
hub / github.com/apache/groovy / step

Method step

src/main/java/groovy/lang/NumberRange.java:633–642  ·  view source on GitHub ↗

{@inheritDoc}

(int numSteps, Closure closure)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 6

hasNextMethod · 0.95
nextMethod · 0.95
asListMethod · 0.95
callMethod · 0.65
compareToMethod · 0.45
multiplyMethod · 0.45

Tested by

no test coverage detected