@Mutable public class MappingIterator<OUTPUT,INPUT> extends SingleIteratorBasedIterator<OUTPUT,INPUT>
| Modifier and Type | Field and Description |
|---|---|
protected @Nonnull FailableUnaryFunction<? super INPUT,? extends OUTPUT,?> |
function |
primaryIterator| Modifier | Constructor and Description |
|---|---|
protected |
MappingIterator(@Nonnull Iterator<INPUT> primaryIterator,
@Nonnull FailableUnaryFunction<? super INPUT,? extends OUTPUT,?> function) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
OUTPUT |
next() |
static <OUTPUT,INPUT> |
with(@Nonnull Iterator<INPUT> iterator,
@Nonnull FailableUnaryFunction<? super INPUT,? extends OUTPUT,?> function)
Returns a new mapping iterator that iterates over the elements of the given iterator mapped by the given function.
|
removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining@Nonnull protected final @Nonnull FailableUnaryFunction<? super INPUT,? extends OUTPUT,?> function
@Pure @Capturable @Nonnull public static <OUTPUT,INPUT> @Nonnull MappingIterator<OUTPUT,INPUT> with(@Captured @Nonnull @Nonnull Iterator<INPUT> iterator, @Nonnull @Nonnull FailableUnaryFunction<? super INPUT,? extends OUTPUT,?> function)
@Pure public boolean hasNext()
Copyright © 2017. All rights reserved.