org.jjoost.collections.iters
Class MappedClosableIterator<X,Y>

java.lang.Object
  extended by org.jjoost.collections.iters.MappedIterator<X,Y>
      extended by org.jjoost.collections.iters.MappedClosableIterator<X,Y>
Type Parameters:
X -
Y -
All Implemented Interfaces:
java.util.Iterator<Y>, ClosableIterator<Y>

public class MappedClosableIterator<X,Y>
extends MappedIterator<X,Y>
implements ClosableIterator<Y>

Given an Iterator object and a function, yields an Iterator representing the result of applying that function to every element of the supplied Iterator

Author:
b.elliottsmith

Constructor Summary
MappedClosableIterator(ClosableIterator<? extends X> base, Function<? super X,? extends Y> function)
           
 
Method Summary
 void close()
           
 
Methods inherited from class org.jjoost.collections.iters.MappedIterator
hasNext, next, remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

MappedClosableIterator

public MappedClosableIterator(ClosableIterator<? extends X> base,
                              Function<? super X,? extends Y> function)
Method Detail

close

public void close()
Specified by:
close in interface ClosableIterator<Y>