Package org.apache.jena.rdf.model
Interface NodeIterator
-
- All Superinterfaces:
ClosableIterator<RDFNode>
,Closeable
,ExtendedIterator<RDFNode>
,java.util.Iterator<RDFNode>
,IteratorCloseable<RDFNode>
- All Known Implementing Classes:
ContNodeIteratorImpl
,NodeIteratorImpl
,SeqNodeIteratorImpl
public interface NodeIterator extends ExtendedIterator<RDFNode>
An iterator which returns RDF nodes.RDF iterators are standard Java iterators, except that they have an extra method that returns specifically typed objects, in this case RDF nodes, and have a
close()
method. that should be called to free resources if the application does not complete the iteration.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Terminate the iteration and free up resources.boolean
hasNext()
Determine if there any more values in the iteration.RDFNode
next()
Return the next RDFNode of the iteration.RDFNode
nextNode()
Return the next RDFNode of the iteration.void
remove()
Unsupported Operation.-
Methods inherited from interface org.apache.jena.util.iterator.ExtendedIterator
andThen, filterDrop, filterKeep, forEach, mapWith, nextOptional, removeNext, toList, toSet
-
-
-
-
Method Detail
-
hasNext
boolean hasNext()
Determine if there any more values in the iteration.- Specified by:
hasNext
in interfacejava.util.Iterator<RDFNode>
- Returns:
- true if and only if there are more values available from the iteration.
-
next
RDFNode next() throws java.util.NoSuchElementException
Return the next RDFNode of the iteration.- Specified by:
next
in interfacejava.util.Iterator<RDFNode>
- Returns:
- The next RDFNode from the iteration.
- Throws:
java.util.NoSuchElementException
- if there are no more nodes to be returned.
-
nextNode
RDFNode nextNode() throws java.util.NoSuchElementException
Return the next RDFNode of the iteration.- Returns:
- The next RDFNode from the iteration.
- Throws:
java.util.NoSuchElementException
- if there are no more nodes to be returned.
-
remove
void remove() throws java.util.NoSuchElementException
Unsupported Operation.- Specified by:
remove
in interfacejava.util.Iterator<RDFNode>
- Throws:
java.util.NoSuchElementException
-
close
void close()
Terminate the iteration and free up resources.Some implementations, e.g. on relational databases, hold resources while the iterator still exists. These will normally be freed when the iteration completes. However, if an application wishes to ensure they are freed without completing the iteration, this method should be called.
.- Specified by:
close
in interfaceClosableIterator<RDFNode>
- Specified by:
close
in interfaceCloseable
-
-