Class ConvertingIterator<S,T>
java.lang.Object
org.eclipse.rdf4j.common.iterator.ConvertingIterator<S,T>
- All Implemented Interfaces:
Iterator<T>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConvertingIterator(Iterator<? extends S> iter) Creates a new ConvertingIterator that operates on the supplied source type itertor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TConverts a source type object to a target type object.booleanhasNext()Checks whether the source type itertor contains more elements.next()Returns the next element from the source type itertor.voidremove()Calls remove() on the underlying itertor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ConvertingIterator
-
-
Method Details
-
convert
-
hasNext
-
next
Returns the next element from the source type itertor.- Specified by:
nextin interfaceIterator<S>- Throws:
NoSuchElementException- If all elements have been returned.IllegalStateException- If the itertor has been closed.
-
remove
public void remove()Calls remove() on the underlying itertor.- Specified by:
removein interfaceIterator<S>- Throws:
UnsupportedOperationException- If the wrapped itertor does not support the remove operation.IllegalStateException- If the itertor has been closed, or ifnext()has not yet been called, orremove()has already been called after the last call tonext().
-