org.apache.jdo.impl.fostore
Class FOStoreExtent.FOStoreExtentIterator

java.lang.Object
  extended byorg.apache.jdo.impl.fostore.FOStoreExtent.FOStoreExtentIterator
All Implemented Interfaces:
java.util.Iterator
Enclosing class:
FOStoreExtent

class FOStoreExtent.FOStoreExtentIterator
extends java.lang.Object
implements java.util.Iterator

Iterates over the elements in a FOStoreExtent.


Field Summary
private  boolean closed
          If false, then can get next object, otherwise next() always throws NoSuchElementException and hasNext() always returns false.
private  int index
          Index into extent as a whole.
private  int instanceIndex
          Index into instances.
private  java.util.ArrayList instances
          Instances that have been retrieved from store.
private  int maxInstances
           
private  java.lang.Object nextObject
           
private  java.util.ArrayList oids
           
private  int oidsIndex
          Index into oids.
private  int size
          Size of extent (number of instances + number of oids).
 
Constructor Summary
(package private) FOStoreExtent.FOStoreExtentIterator(FOStoreExtent extent)
           
 
Method Summary
(package private)  void close()
          Disallow getting further objects from this iterator.
private  void getNext()
          Get the next instance.
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
          Always throws UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instances

private java.util.ArrayList instances
Instances that have been retrieved from store.


oids

private java.util.ArrayList oids

maxInstances

private int maxInstances

instanceIndex

private int instanceIndex
Index into instances.


oidsIndex

private int oidsIndex
Index into oids.


index

private int index
Index into extent as a whole.


size

private final int size
Size of extent (number of instances + number of oids).


closed

private boolean closed
If false, then can get next object, otherwise next() always throws NoSuchElementException and hasNext() always returns false.


nextObject

private java.lang.Object nextObject
Constructor Detail

FOStoreExtent.FOStoreExtentIterator

FOStoreExtent.FOStoreExtentIterator(FOStoreExtent extent)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator
See Also:
Iterator.hasNext()

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator
See Also:
Iterator.next()

getNext

private void getNext()
Get the next instance. Close the iterator if there are no more instances available.


remove

public void remove()
Always throws UnsupportedOperationException.

Specified by:
remove in interface java.util.Iterator

close

void close()
Disallow getting further objects from this iterator.