Package org.wildfly.common.iteration
Class CompositeIterable<T>
java.lang.Object
org.wildfly.common.iteration.CompositeIterable<T>
- All Implemented Interfaces:
Iterable<T>
Used for iterating over an series of iterables, thus avoiding the need to allocate/populate a new list containing all elements.
More efficient than the alternative when the number of iterables is arbitrary and small relative to the size of each iterable.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeIterable(Iterable<? extends T>... iterables) Constructs a new composite iterable.CompositeIterable(List<? extends Iterable<? extends T>> iterables) Constructs a new composite iterable. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CompositeIterable
Constructs a new composite iterable.- Parameters:
iterables- a series of iterables
-
CompositeIterable
Constructs a new composite iterable.- Parameters:
iterables- a series of iterables
-
-
Method Details