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

Method get

src/main/java/groovy/util/Iterators.java:399–408  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

397 }
398
399 private T get(int index) {
400 while (cache.size() <= index) {
401 if (source.hasNext()) {
402 cache.add(source.next());
403 } else {
404 return null;
405 }
406 }
407 return cache.get(index);
408 }
409
410 private int size() {
411 if (source.hasNext()) return Integer.MAX_VALUE;

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.65
addMethod · 0.65
getMethod · 0.65
hasNextMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected