org.netbeans.mdr.persistence.btreeimpl.btreeindex
Class BtreeIterator

java.lang.Object
  extended by org.netbeans.mdr.persistence.btreeimpl.btreeindex.BtreeIterator
All Implemented Interfaces:
java.util.Iterator

public class BtreeIterator
extends java.lang.Object
implements java.util.Iterator

Iterator over a BtreeCollection, which is the set of values contained in a SinglevaluedBtree.

Version:
1.0
Author:
Dana Bergen

Field Summary
protected  Btree btree
           
protected  org.netbeans.mdr.persistence.btreeimpl.btreeindex.SearchResult current
           
protected  int modCount
           
protected  BtreePageSource pageSource
           
 
Method Summary
protected  void finalize()
           
 boolean hasNext()
          Tests whether there are any more elements to return
 java.lang.Object next()
          Gets the next value in the btree.
 void remove()
          This is not supported.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

btree

protected Btree btree

current

protected org.netbeans.mdr.persistence.btreeimpl.btreeindex.SearchResult current

pageSource

protected BtreePageSource pageSource

modCount

protected int modCount
Method Detail

hasNext

public boolean hasNext()
Tests whether there are any more elements to return

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if a call to next() would succeed

next

public java.lang.Object next()
                      throws java.util.NoSuchElementException
Gets the next value in the btree. If this is on a different page from the previous value, the old page will be unpinned. If there are no more records, the last page will be unpinned.

Specified by:
next in interface java.util.Iterator
Returns:
The next value in the btree
Throws:
java.util.NoSuchElementException - If there was any error or if there are no more records

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

remove

public void remove()
            throws java.lang.UnsupportedOperationException
This is not supported.

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - Always thrown.


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.