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

Method by

src/main/java/groovy/lang/IntRange.java:237–239  ·  view source on GitHub ↗

Creates a new NumberRange with the same from and to as this IntRange but with a step size of stepSize . @param stepSize the desired step size @return a new NumberRange @since 2.5.0

(T stepSize)

Source from the content-addressed store, hash-verified

235 * @since 2.5.0
236 */
237 public <T extends Number & Comparable> NumberRange by(T stepSize) {
238 return new NumberRange(getFrom(), getTo(), stepSize, true, true); // GROOVY-10496
239 }
240
241 private void checkSize() {
242 // size() in the Collection interface returns an integer, so ranges can have no more than Integer.MAX_VALUE elements

Callers

nothing calls this directly

Calls 2

getFromMethod · 0.95
getToMethod · 0.95

Tested by

no test coverage detected