public abstract class ConverterIterator<S,T>
extends java.lang.Object
implements java.util.Iterator<T>
| Modifier | Constructor and Description |
|---|---|
protected |
ConverterIterator(java.util.Iterator<S> source)
Only called by subclasses, constructs an Iterator that
converts objects of type S to objects of type T.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
convert(S source)
Subclasses implement this method to perform the conversion from a source
class S to a target class T.
|
boolean |
hasNext()
Wrapped implementation of the Iterator.hasNext method.
|
T |
next()
Wrapped implementation of the Iterator.next method.
|
void |
remove()
Forward the call to the underlying source iteratro
|
protected ConverterIterator(java.util.Iterator<S> source)
source - the source iterator of type Spublic boolean hasNext()
hasNext in interface java.util.Iterator<T>public T next()
next in interface java.util.Iterator<T>public void remove()
remove in interface java.util.Iterator<T>