public class IteratorMapper<E,S> extends java.lang.Object implements CloseableIterator<S>
CloseableIterator and will close the provided iterator
if it also implemented CloseableIterator.| Constructor and Description |
|---|
IteratorMapper(java.util.Iterator<? extends E> iterator,
java.util.function.Function<? super E,? extends S> function) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
hasNext() |
S |
next() |
void |
remove() |
public boolean hasNext()
hasNext in interface java.util.Iterator<S>public void remove()
remove in interface java.util.Iterator<S>public void close()
close in interface java.lang.AutoCloseableclose in interface CloseableIterator<S>