org.ozoneDB.collections
Class _BaseTreeMap_TreeIterator

java.lang.Object
  extended byorg.ozoneDB.collections._BaseTreeMap_TreeIterator
All Implemented Interfaces:
java.util.Iterator, java.io.Serializable

public final class _BaseTreeMap_TreeIterator
extends java.lang.Object
implements java.util.Iterator, java.io.Serializable

DO NOT USE THIS CLASS DIRECTLY.

This should be an inner class; ozone unfortunately does not (yet) support inner classes as Ozone objects. Until it does we have to resort to this hack.

Note that this class resembles _BaseTreeMap_OzoneTreeIteratorImpl.

See Also:
Serialized Form

Constructor Summary
_BaseTreeMap_TreeIterator(BaseTreeMap owner, int type)
           
_BaseTreeMap_TreeIterator(BaseTreeMap owner, int type, BaseTreeMap.Node first, BaseTreeMap.Node max)
           
 
Method Summary
 boolean hasNext()
          Returns true if the Iterator has more elements.
 java.lang.Object next()
          Returns the next element in the Iterator's sequential view.
 void remove()
          Removes from the backing TreeMap the last element which was fetched with the next() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

_BaseTreeMap_TreeIterator

public _BaseTreeMap_TreeIterator(BaseTreeMap owner,
                                 int type)

_BaseTreeMap_TreeIterator

public _BaseTreeMap_TreeIterator(BaseTreeMap owner,
                                 int type,
                                 BaseTreeMap.Node first,
                                 BaseTreeMap.Node max)
Method Detail

hasNext

public boolean hasNext()
Returns true if the Iterator has more elements.

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if there are more elements
Throws:
java.util.ConcurrentModificationException - if the TreeMap was modified

next

public java.lang.Object next()
Returns the next element in the Iterator's sequential view.

Specified by:
next in interface java.util.Iterator
Returns:
the next element
Throws:
java.util.ConcurrentModificationException - if the TreeMap was modified
java.util.NoSuchElementException - if there is none

remove

public void remove()
Removes from the backing TreeMap the last element which was fetched with the next() method.

Specified by:
remove in interface java.util.Iterator
Throws:
java.util.ConcurrentModificationException - if the TreeMap was modified
java.lang.IllegalStateException - if called when there is no last element


Copyright © 2004 The Ozone Database Project - www.ozone-db.org. All Rights Reserved.