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)
| 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 |