T
- Type of element being iteraredpublic class LazyIterablesConcatenator<T>
extends java.lang.Object
implements java.lang.Iterable<T>
Iterable
using several underlying ones to provide the values. The
"lazy" denomination is due to the fact that no iterable is consulted until the one(s) before it have been
fully exhausted.Modifier and Type | Field and Description |
---|---|
private java.lang.Iterable<? extends java.lang.Iterable<? extends T>> |
iterables |
Constructor and Description |
---|
LazyIterablesConcatenator(java.lang.Iterable<? extends java.lang.Iterable<? extends T>> iterables) |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<? extends java.lang.Iterable<? extends T>> |
getIterables() |
java.util.Iterator<T> |
iterator() |
static <T> java.lang.Iterable<T> |
lazyConcatenateIterables(java.lang.Iterable<? extends java.lang.Iterable<? extends T>> iterables) |
java.lang.String |
toString() |
private final java.lang.Iterable<? extends java.lang.Iterable<? extends T>> iterables
public LazyIterablesConcatenator(java.lang.Iterable<? extends java.lang.Iterable<? extends T>> iterables)
public java.lang.Iterable<? extends java.lang.Iterable<? extends T>> getIterables()
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public java.lang.String toString()
toString
in class java.lang.Object
public static <T> java.lang.Iterable<T> lazyConcatenateIterables(java.lang.Iterable<? extends java.lang.Iterable<? extends T>> iterables)
T
- Type if iterated elementiterables
- The iterables to concatenate - ignored if null
Iterable
that goes over all the elements in the wrapped iterables one after the
other. The denomination "lazy" indicates that no iterable is consulted until the
previous one has been fully exhausted.