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>
public class LazyIterablesConcatenator<T> extends Object implements Iterable<T>
Creates a "smooth" wrappingIterable
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.- Author:
- Apache MINA SSHD Project
-
-
Constructor Summary
Constructors Constructor Description LazyIterablesConcatenator(Iterable<? extends Iterable<? extends T>> iterables)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<? extends Iterable<? extends T>>
getIterables()
Iterator<T>
iterator()
static <T> Iterable<T>
lazyConcatenateIterables(Iterable<? extends Iterable<? extends T>> iterables)
String
toString()
-
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
-
-
-
-
Method Detail
-
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.
-
-