org.openrdf.sail.memory.model
Class MemStatementIterator<X extends Exception>
java.lang.Object
info.aduna.iteration.CloseableIterationBase<E,X>
info.aduna.iteration.LookAheadIteration<MemStatement,X>
org.openrdf.sail.memory.model.MemStatementIterator<X>
- All Implemented Interfaces:
- CloseableIteration<MemStatement,X>, Iteration<MemStatement,X>
public class MemStatementIterator<X extends Exception>
- extends LookAheadIteration<MemStatement,X>
A StatementIterator that can iterate over a list of Statement objects. This
iterator compares Resource and Literal objects using the '==' operator, which
is possible thanks to the extensive sharing of these objects in the
MemoryStore.
|
Constructor Summary |
MemStatementIterator(MemStatementList statementList,
MemResource subject,
MemURI predicate,
MemValue object,
boolean explicitOnly,
int snapshot,
ReadMode readMode,
MemResource... contexts)
Creates a new MemStatementIterator that will iterate over the statements
contained in the supplied MemStatementList searching for statements that
match the specified pattern of subject, predicate, object and context. |
|
Method Summary |
protected MemStatement |
getNextElement()
Searches through statementList, starting from index
_nextStatementIdx + 1, for statements that match the constraints
that have been set for this iterator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemStatementIterator
public MemStatementIterator(MemStatementList statementList,
MemResource subject,
MemURI predicate,
MemValue object,
boolean explicitOnly,
int snapshot,
ReadMode readMode,
MemResource... contexts)
- Creates a new MemStatementIterator that will iterate over the statements
contained in the supplied MemStatementList searching for statements that
match the specified pattern of subject, predicate, object and context.
- Parameters:
statementList - the statements over which to iterate.subject - subject of pattern.predicate - predicate of pattern.object - object of pattern.context - context of pattern.
getNextElement
protected MemStatement getNextElement()
- Searches through statementList, starting from index
_nextStatementIdx + 1, for statements that match the constraints
that have been set for this iterator. If a matching statement has been
found it will be stored in _nextStatement and
_nextStatementIdx points to the index of this statement in
_statementList. Otherwise, _nextStatement will set to
null.
- Specified by:
getNextElement in class LookAheadIteration<MemStatement,X extends Exception>
Copyright © 2001-2008 Aduna. All Rights Reserved.