public final class FunctionIterator<T,V> extends java.lang.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(java.lang.Iterable<T> iterable,
Function<? super T,? extends V> function) |
FunctionIterator(java.util.Iterator<T> newIterator,
Function<? super T,? extends V> function) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
hasNext() |
V |
next() |
void |
remove() |
public FunctionIterator(java.lang.Iterable<T> iterable, Function<? super T,? extends V> function)
public void remove()
remove in interface java.util.Iterator<V>public boolean hasNext()
hasNext in interface java.util.Iterator<V>public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException