|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.molae.pipe.basic.AbstractListIterator<E>
net.sf.molae.pipe.basic.ListBasedListIterator<E>
public class ListBasedListIterator<E>
Provides an implementation of the ListIterator interface
that passes all calls to the underlying list.
Parts are copied from AbstractList.
Note that this implementation will throw an
UnsupportedOperationException in response to its
remove(), set(Object) and add(Object) methods
unless the list's remove(int), set(int, Object), and
add(int, Object) methods are implemented.
This implementation can be made to throw runtime exceptions in the
face of concurrent modification by providing a ModificationMark.
| Constructor Summary | |
|---|---|
ListBasedListIterator(List<E> base)
Constructs a ListBasedListIterator object. |
|
ListBasedListIterator(List<E> base,
int index)
Constructs a ListBasedListIterator object. |
|
ListBasedListIterator(List<E> base,
int index,
ModificationMark mark)
Constructs a ListBasedListIterator object. |
|
ListBasedListIterator(List<E> base,
ModificationMark mark)
Constructs a ListBasedListIterator object. |
|
| Method Summary | |
|---|---|
void |
add(E o)
This implementation calls the corresponding method of the base list. |
protected E |
get()
This implementation calls the corresponding method of the base list. |
boolean |
hasNext()
This implementation compares the cursor with the size of the base list. |
void |
remove()
This implementation calls the corresponding method of the base list. |
void |
set(E o)
This implementation calls the corresponding method of the base list. |
| Methods inherited from class net.sf.molae.pipe.basic.AbstractListIterator |
|---|
forwardTo, hasPrevious, next, nextIndex, previous, previousIndex, setCursor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListBasedListIterator(List<E> base,
ModificationMark mark)
base - the base listmark - Modification mark of the base object
NullPointerException - if the specified list or mark are
null.public ListBasedListIterator(List<E> base)
base - the base list
public ListBasedListIterator(List<E> base,
int index,
ModificationMark mark)
base - the base listindex - start position of the created ListIterator.mark - Modification mark of the base object
public ListBasedListIterator(List<E> base,
int index)
base - the base listindex - start position of the created ListIterator.| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<E>hasNext in interface ListIterator<E>hasNext in class AbstractListIterator<E>protected E get()
get in class AbstractListIterator<E>ConcurrentModificationException - if modification marks are not
equalpublic void remove()
remove in interface Iterator<E>remove in interface ListIterator<E>remove in class AbstractListIterator<E>IllegalStateException - depending on the base listpublic void set(E o)
set in interface ListIterator<E>set in class AbstractListIterator<E>ClassCastException - depending on the base list
IllegalArgumentException - depending on the base list
IllegalStateException - depending on the base listpublic void add(E o)
add in interface ListIterator<E>add in class AbstractListIterator<E>ClassCastException - depending on the base list
IllegalArgumentException - depending on the base list
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||