public class ListIteratorWrapper
extends java.lang.Object
implements java.util.ListIterator
| Constructor and Description |
|---|
ListIteratorWrapper(java.util.Iterator iterator)
Constructs a new
ListIteratorWrapper that will wrap
the given iterator. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.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.
|
java.lang.Object |
next()
Returns the next element from the iterator.
|
int |
nextIndex()
Returns in the index of the next element.
|
java.lang.Object |
previous()
Returns the the previous element.
|
int |
previousIndex()
Returns the index of the previous element.
|
void |
remove()
Throws
UnsupportedOperationException. |
void |
set(java.lang.Object o)
Throws
UnsupportedOperationException. |
public ListIteratorWrapper(java.util.Iterator iterator)
ListIteratorWrapper that will wrap
the given iterator.iterator - the iterator to wrapjava.lang.NullPointerException - if the iterator is nullpublic void add(java.lang.Object o)
throws java.lang.UnsupportedOperationException
UnsupportedOperationException.add in interface java.util.ListIteratoro - ignoredjava.lang.UnsupportedOperationException - alwayspublic boolean hasNext()
hasNext in interface java.util.IteratorhasNext in interface java.util.ListIteratorpublic boolean hasPrevious()
hasPrevious in interface java.util.ListIteratorpublic java.lang.Object next()
throws java.util.NoSuchElementException
next in interface java.util.Iteratornext in interface java.util.ListIteratorjava.util.NoSuchElementException - if there are no more elementspublic int nextIndex()
nextIndex in interface java.util.ListIteratorpublic java.lang.Object previous()
throws java.util.NoSuchElementException
previous in interface java.util.ListIteratorjava.util.NoSuchElementException - if there are no previous elementspublic int previousIndex()
previousIndex in interface java.util.ListIteratorpublic void remove()
throws java.lang.UnsupportedOperationException
UnsupportedOperationException.remove in interface java.util.Iteratorremove in interface java.util.ListIteratorjava.lang.UnsupportedOperationException - alwayspublic void set(java.lang.Object o)
throws java.lang.UnsupportedOperationException
UnsupportedOperationException.set in interface java.util.ListIteratoro - ignoredjava.lang.UnsupportedOperationException - alwaysCopyright © 2001-2004 Apache Software Foundation. Documenation generated April 29 2013.