Class MemTripleIterator<X extends Exception>
- java.lang.Object
-
- org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E>
-
- org.eclipse.rdf4j.common.iteration.LookAheadIteration<MemTriple>
-
- org.eclipse.rdf4j.sail.memory.model.MemTripleIterator<X>
-
- All Implemented Interfaces:
AutoCloseable,Iterator<MemTriple>,org.eclipse.rdf4j.common.iteration.CloseableIteration<MemTriple>
public class MemTripleIterator<X extends Exception> extends org.eclipse.rdf4j.common.iteration.LookAheadIteration<MemTriple>
An Iteration that can iterate over a list ofTripleobjects.- Author:
- Jeen Broekstra
-
-
Constructor Summary
Constructors Constructor Description MemTripleIterator(MemStatementList statementList, MemResource subject, MemIRI predicate, MemValue object, int snapshot)Creates a new MemTripleIterator that will iterate over the triples contained in the supplied MemStatementList searching for triples that occur as either subject or object in those statements, and which match the specified pattern of subject, predicate, object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MemTriplegetNextElement()Searches through statementList, starting from index _nextStatementIdx + 1, for triples that match the constraints that have been set for this iterator.protected voidhandleClose()-
Methods inherited from class org.eclipse.rdf4j.common.iteration.LookAheadIteration
hasNext, next, remove
-
Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration
close, isClosed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
MemTripleIterator
public MemTripleIterator(MemStatementList statementList, MemResource subject, MemIRI predicate, MemValue object, int snapshot) throws InterruptedException
Creates a new MemTripleIterator that will iterate over the triples contained in the supplied MemStatementList searching for triples that occur as either subject or object in those statements, and which match the specified pattern of subject, predicate, object.- Parameters:
statementList- the statements over which to iterate.subject- subject of pattern.predicate- predicate of pattern.object- object of pattern.- Throws:
InterruptedException
-
-
Method Detail
-
getNextElement
protected MemTriple getNextElement()
Searches through statementList, starting from index _nextStatementIdx + 1, for triples that match the constraints that have been set for this iterator.- Specified by:
getNextElementin classorg.eclipse.rdf4j.common.iteration.LookAheadIteration<MemTriple>
-
handleClose
protected void handleClose()
- Specified by:
handleClosein classorg.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<MemTriple>
-
-