org.apache.commons.collections.iterators
Class ListIteratorWrapper
- ListIterator
public class ListIteratorWrapper
implements ListIterator
As the wrapped Iterator is traversed, ListIteratorWrapper
builds a LinkedList of its values, permitting all required
operations of ListIterator.
$Revision: 1.7 $ $Date: 2004/02/18 00:59:50 $- Morgan Delagrange
- Stephen Colebourne
ListIteratorWrapper(Iterator iterator)- Constructs a new
ListIteratorWrapper that will wrap
the given iterator.
|
void | add(Object o)- Throws
UnsupportedOperationException.
|
boolean | hasNext()- Returns true if there are more elements in the iterator.
|
boolean | hasPrevious()- Returns true if there are previous elements in the iterator.
|
Object | next()- Returns the next element from the iterator.
|
int | nextIndex()- Returns in the index of the next element.
|
Object | previous()- Returns the the previous element.
|
int | previousIndex()- Returns the index of the previous element.
|
void | remove()- Throws
UnsupportedOperationException.
|
void | set(Object o)- Throws
UnsupportedOperationException.
|
ListIteratorWrapper
public ListIteratorWrapper(Iterator iterator)
Constructs a new ListIteratorWrapper that will wrap
the given iterator.
iterator - the iterator to wrap
add
public void add(Object o)
throws UnsupportedOperationException Throws UnsupportedOperationException.
hasNext
public boolean hasNext()
Returns true if there are more elements in the iterator.
- true if there are more elements
hasPrevious
public boolean hasPrevious()
Returns true if there are previous elements in the iterator.
- true if there are previous elements
next
public Object next()
throws NoSuchElementException Returns the next element from the iterator.
- the next element from the iterator
nextIndex
public int nextIndex()
Returns in the index of the next element.
- the index of the next element
previous
public Object previous()
throws NoSuchElementException Returns the the previous element.
previousIndex
public int previousIndex()
Returns the index of the previous element.
- the index of the previous element
remove
public void remove()
throws UnsupportedOperationException Throws UnsupportedOperationException.
set
public void set(Object o)
throws UnsupportedOperationException Throws UnsupportedOperationException.
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.