org.jrdf.graph.local.mem.iterator
Class AnyResourceIterator
java.lang.Object
org.jrdf.graph.local.mem.iterator.AnyResourceIterator
- All Implemented Interfaces:
- Iterator<Resource>, ClosableIterator<Resource>
public class AnyResourceIterator
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
longIndex012
protected final LongIndex longIndex012
graphHandler012
protected final GraphHandler graphHandler012
resourceFactory
protected final ResourceFactory resourceFactory
graphHandler201
protected final GraphHandler graphHandler201
iterator012
protected Iterator<Map.Entry<Long,Map<Long,Set<Long>>>> iterator012
iterator201
protected Iterator<Map.Entry<Long,Map<Long,Set<Long>>>> iterator201
nextResource
protected Resource nextResource
firstTime
protected boolean firstTime
nodePool
protected NodePool nodePool
AnyResourceIterator
public AnyResourceIterator(LongIndex[] newLongIndexes,
GraphHandler[] newGraphHandlers,
ResourceFactory newResourceFactory,
NodePool newNodePool)
next
public Resource next()
getNextNodeID
protected long getNextNodeID(Iterator<Map.Entry<Long,Map<Long,Set<Long>>>> iterator,
GraphHandler graphHandler)
- Provides a customizable way in which to filter out resource nodes based on type.
- Parameters:
iterator - iterators over the index.graphHandler - used to create the nodes from the iterator.
- Returns:
- the next node identifier.
close
public boolean close()
- Description copied from interface:
ClosableIterator
- Closes the iterator by freeing any resources that it current holds.
This must be done as soon as possible. Once an iterator is closed none of the
operations on a iterator will operate i.e. they will throw an exception.
- Specified by:
close in interface ClosableIterator<E>
- Returns:
- true if it was successfully closed.
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<E>
remove
public void remove()
- Specified by:
remove in interface Iterator<E>
getNextResource
protected Resource getNextResource()