I
- the type of the input elementsO
- the type of the output elementspublic abstract class TransformingIterator<I,O>
extends java.lang.Object
implements java.util.Iterator<O>
Constructor and Description |
---|
TransformingIterator(java.util.Iterator<I> delegate)
Constructs a new transforming iterator
|
public TransformingIterator(java.util.Iterator<I> delegate)
delegate
- the iterator to wrappublic boolean hasNext()
hasNext
in interface java.util.Iterator<O>
protected abstract O transform(I input)
input
- the elementpublic void remove()
remove
in interface java.util.Iterator<O>