MCPcopy Create free account
hub / github.com/antlr/codebuff / partition

Method partition

output/java_guava/1.4.16/Iterators.java:582–584  ·  view source on GitHub ↗

Divides an iterator into unmodifiable sublists of the given size (the final list may be smaller). For example, partitioning an iterator containing [a, b, c, d, e] with a partition size of 3 yields [[a, b, c], [d, e]] -- an outer iterator containing two inner lists of three and two el

(Iterator<T> iterator, int size)

Source from the content-addressed store, hash-verified

580
581
582 public static <T> UnmodifiableIterator<List<T>> partition(Iterator<T> iterator, int size) {
583 return partitionImpl(iterator, size, false);
584 }
585
586 /**
587 * Divides an iterator into unmodifiable sublists of the given size, padding

Callers 1

iteratorMethod · 0.95

Calls 1

partitionImplMethod · 0.95

Tested by

no test coverage detected