org.ozoneDB.collections
Interface OzoneListIterator

All Superinterfaces:
java.util.Iterator, java.util.ListIterator, org.ozoneDB.OzoneCompatibleOrProxy, OzoneIterator, org.ozoneDB.OzoneRemote
All Known Implementing Classes:
_BaseList_ListIteratorImpl, _BaseList_SubList_listIterator

public interface OzoneListIterator
extends java.util.ListIterator, OzoneIterator

See the overall description on OzoneCollection.

Author:
Leo Mekenkamp (mind the anti-sp@m)

Method Summary
 void add(java.lang.Object o)
          Inserts the specified element into the list (optional operation).
 java.lang.Object previous()
          Returns the previous element in the list.
 
Methods inherited from interface java.util.ListIterator
hasNext, hasPrevious, next, nextIndex, previousIndex, remove, set
 
Methods inherited from interface org.ozoneDB.collections.OzoneIterator
next, remove
 
Methods inherited from interface org.ozoneDB.OzoneCompatibleOrProxy
getObjectID
 

Method Detail

previous

public java.lang.Object previous()
Returns the previous element in the list. This method may be called repeatedly to iterate through the list backwards, or intermixed with calls to next to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)

Specified by:
previous in interface java.util.ListIterator
Returns:
the previous element in the list.
Throws:
java.util.NoSuchElementException - if the iteration has no previous element.

add

public void add(java.lang.Object o)
Inserts the specified element into the list (optional operation). The element is inserted immediately before the next element that would be returned by next, if any, and after the next element that would be returned by previous, if any. (If the list contains no elements, the new element becomes the sole element on the list.) The new element is inserted before the implicit cursor: a subsequent call to next would be unaffected, and a subsequent call to previous would return the new element. (This call increases by one the value that would be returned by a call to nextIndex or previousIndex.)

Specified by:
add in interface java.util.ListIterator
Parameters:
o - the element to insert.
Throws:
java.lang.UnsupportedOperationException - if the add method is not supported by this list iterator.
java.lang.ClassCastException - if the class of the specified element prevents it from being added to this list.
java.lang.IllegalArgumentException - if some aspect of this element prevents it from being added to this list.


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