Class LazyIterablesConcatenator<T>
java.lang.Object
org.apache.sshd.common.util.helper.LazyIterablesConcatenator<T>
- Type Parameters:
T
- Type of element being iterared
- All Implemented Interfaces:
Iterable<T>
Creates a "smooth" wrapping
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.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLazyIterablesConcatenator
(Iterable<? extends Iterable<? extends T>> iterables) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
iterables
-
-
Constructor Details
-
LazyIterablesConcatenator
-
-
Method Details
-
getIterables
-
iterator
-
toString
-
lazyConcatenateIterables
public static <T> Iterable<T> lazyConcatenateIterables(Iterable<? extends Iterable<? extends T>> iterables) - Type Parameters:
T
- Type if iterated element- Parameters:
iterables
- The iterables to concatenate - ignored ifnull
- Returns:
- An
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.
-