public final class Iterables2 extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Iterable<List<T>> |
zip(Iterable<Iterable<T>> iterables,
T defaultValue)
Zips multiple iterables into one iterable that will return iterators to step over
rows of the input iterators (columns).
|
static <T> Iterable<List<T>> |
zip(T defaultValue,
Iterable<T>... iterables)
Varargs convenience function to call
zip(Iterable, Object). |
public static <T> Iterable<List<T>> zip(Iterable<Iterable<T>> iterables, T defaultValue)
defaultValue.
The returned iterator is lazy, in that 'rows' are constructed as they are requested.T - Type of value being iterated over.iterables - Columns to iterate over.defaultValue - Default fill value when an input iterable is exhausted.public static <T> Iterable<List<T>> zip(T defaultValue, Iterable<T>... iterables)
zip(Iterable, Object).T - Type of value being iterated over.defaultValue - Default fill value when an input iterable is exhausted.iterables - Columns to iterate over.