T - The type of the iterated elements.public final class Joined<T>
extends java.lang.Object
implements java.lang.Iterable<T>
Iterable which joins other Iterables by iterating the values of them one after another.
Note: other frameworks call this operation, "flatten". While this is technically appropriate, it often doesn't really express the intent very well. For instance, if you want to iterate the elements of two lists one after another, this code is probably easier to grasp:
Iterable<SomeType> result = new Joined<>(list1, list2);
than this one
Iterable<SomeType> result = new Flattened<>(list1, list2);
| Constructor and Description |
|---|
Joined(java.lang.Iterable<java.lang.Iterable<T>> iterables) |
Joined(java.lang.Iterable<T>... iterables) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<T> |
iterator() |