Package com.jgoodies.common.collect
Class LinkedListModel.ReportingListIterator
java.lang.Object
com.jgoodies.common.collect.LinkedListModel.ReportingListIterator
- All Implemented Interfaces:
Iterator<E>
,ListIterator<E>
- Enclosing class:
- LinkedListModel<E>
A ListIterator that fires ListDataEvents if elements are added or removed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ListIterator<E>
Refers to the wrapped ListIterator that is used to forward all ListIterator methods to.private int
Holds the object that was returned last by the underlying ListIteratur. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
delegate
Refers to the wrapped ListIterator that is used to forward all ListIterator methods to. -
lastReturnedIndex
private int lastReturnedIndexHolds the object that was returned last by the underlying ListIteratur. Used to determine the index of the element removed.
-
-
Constructor Details
-
ReportingListIterator
ReportingListIterator(ListIterator<E> delegate)
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator<E>
-
previous
- Specified by:
previous
in interfaceListIterator<E>
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<E>
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<E>
-
remove
public void remove() -
set
- Specified by:
set
in interfaceListIterator<E>
-
add
- Specified by:
add
in interfaceListIterator<E>
-