public final class FunctionIterator<T,V> extends Object implements CloseableIterator<V>
Iterator implementation to convert each item from the target
iterator to a new object applying the function on next().| Constructor and Description |
|---|
FunctionIterator(Iterable<T> iterable,
Function<? super T,? extends V> function) |
FunctionIterator(Iterator<T> newIterator,
Function<? super T,? extends V> function) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
hasNext() |
V |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic FunctionIterator(Iterable<T> iterable, Function<? super T,? extends V> function)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOException