@Mutable public class FlatteningIterator<OUTPUT,INPUT> extends SingleIteratorBasedIterator<OUTPUT,INPUT>
| Modifier and Type | Field and Description |
|---|---|
protected @NonNegative int |
level |
primaryIterator| Modifier | Constructor and Description |
|---|---|
protected |
FlatteningIterator(@Nonnull Iterator<? extends INPUT> primaryIterator,
@NonNegative int level) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
OUTPUT |
next() |
static <OUTPUT,INPUT> |
with(@Nonnull Iterator<? extends INPUT> iterator,
@NonNegative int level)
Returns a new flattening iterator that iterates over the elements of the given iterator with all collections up to the given level flattened.
|
removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining@Pure @Capturable @Nonnull public static <OUTPUT,INPUT> @Nonnull FlatteningIterator<OUTPUT,INPUT> with(@Captured @Nonnull @Nonnull Iterator<? extends INPUT> iterator, @NonNegative @NonNegative int level)
@Pure public boolean hasNext()
Copyright © 2017. All rights reserved.