KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > collections > OzoneListIterator


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Library License version 1 published by ozone-db.org.
3
//
4
// This file is
5
// Copyright (C) 2002-@year@ Leo Mekenkamp. All rights reserved.
6
// $Id: OzoneListIterator.java,v 1.2 2003/01/27 17:41:36 leomekenkamp Exp $
7

8 package org.ozoneDB.collections;
9
10 import java.util.ListIterator JavaDoc;
11
12 /**
13  * See the overall description on {@link org.ozoneDB.collections.OzoneCollection}.
14  * @author <a HREF="mailto:ozoneATmekenkampD0Tcom">Leo Mekenkamp (mind the anti-sp@m)</a>
15  */

16 public interface OzoneListIterator extends ListIterator JavaDoc, OzoneIterator {
17
18     /** Returns the previous element in the list. This method may be called
19      * repeatedly to iterate through the list backwards, or intermixed with
20      * calls to <tt>next</tt> to go back and forth. (Note that alternating
21      * calls to <tt>next</tt> and <tt>previous</tt> will return the same
22      * element repeatedly.)
23      *
24      * @return the previous element in the list.
25      *
26      * @exception java.util.NoSuchElementException if the iteration has no previous
27      * element.
28      *
29      */

30     public Object JavaDoc previous(); /*update*/
31
32     /** Inserts the specified element into the list (optional operation). The
33      * element is inserted immediately before the next element that would be
34      * returned by <tt>next</tt>, if any, and after the next element that
35      * would be returned by <tt>previous</tt>, if any. (If the list contains
36      * no elements, the new element becomes the sole element on the list.)
37      * The new element is inserted before the implicit cursor: a subsequent
38      * call to <tt>next</tt> would be unaffected, and a subsequent call to
39      * <tt>previous</tt> would return the new element. (This call increases
40      * by one the value that would be returned by a call to <tt>nextIndex</tt>
41      * or <tt>previousIndex</tt>.)
42      *
43      * @param o the element to insert.
44      * @exception UnsupportedOperationException if the <tt>add</tt> method is
45      * not supported by this list iterator.
46      *
47      * @exception ClassCastException if the class of the specified element
48      * prevents it from being added to this list.
49      *
50      * @exception IllegalArgumentException if some aspect of this element
51      * prevents it from being added to this list.
52      *
53      */

54     public void add(Object JavaDoc o); /*update*/
55
56 }
57
Popular Tags