|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.util.iterators.ConvertingIterator<S,T>
public abstract class ConvertingIterator<S,T>
An Iterator that converts an iterator over objects of type S (the source type) to an iterator over objects of type T (the target type).
| Constructor Summary | |
|---|---|
ConvertingIterator(Iterator<? extends S> iter)
Creates a new ConvertingIterator that operates on the supplied source type itertor. |
|
| Method Summary | |
|---|---|
protected abstract T |
convert(S sourceObject)
Converts a source type object to a target type object. |
boolean |
hasNext()
Checks whether the source type itertor contains more elements. |
T |
next()
Returns the next element from the source type itertor. |
void |
remove()
Calls remove() on the underlying itertor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConvertingIterator(Iterator<? extends S> iter)
iter - The source type itertor for this ConvertingIterator, must
not be null.| Method Detail |
|---|
protected abstract T convert(S sourceObject)
public boolean hasNext()
hasNext in interface Iterator<T>public T next()
next in interface Iterator<T>NoSuchElementException - If all elements have been returned.
IllegalStateException - If the itertor has been closed.public void remove()
remove in interface Iterator<T>UnsupportedOperationException - If the wrapped itertor does not support the remove
operation.
IllegalStateException - If the itertor has been closed, or if next() has not yet
been called, or remove() has already been called after the
last call to next().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||