org.openrdf.repository.object.result
Class ObjectIterator<S,E>
java.lang.Object
org.openrdf.repository.object.result.ObjectIterator<S,E>
- Type Parameters:
S - Type of the delegate (Statement)E - Type of the result
- All Implemented Interfaces:
- Iterator<E>
public abstract class ObjectIterator<S,E>
- extends Object
- implements Iterator<E>
A general purpose iteration wrapping Sesame's iterations. This class converts
the results, converts the Exceptions into RDFObjectRuntimeExeptions,
and ensures that the iteration is closed when all values have been read (on {
next()).
- Author:
- James Leigh
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectIterator
public ObjectIterator(CloseableIteration<? extends S,?> delegate)
close
public static void close(Iterator<?> iter)
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<E>
next
public E next()
- Specified by:
next in interface Iterator<E>
remove
public void remove()
- Specified by:
remove in interface Iterator<E>
close
public void close()
singleResult
public E singleResult()
throws RepositoryException
- Throws:
RepositoryException
asList
public List<E> asList()
throws RepositoryException
- Throws:
RepositoryException
asSet
public Set<E> asSet()
throws RepositoryException
- Throws:
RepositoryException
addTo
public <C extends Collection<? super E>> C addTo(C collection)
throws RepositoryException
- Throws:
RepositoryException
convert
protected E convert(S element)
throws RepositoryException
- Throws:
RepositoryException
remove
protected void remove(S element)
throws RepositoryException
- Throws:
RepositoryException
Copyright © 2004-2009 James Leigh Services Inc.. All Rights Reserved.