gausssoft.collections
Class FilterListIterator
java.lang.Object
|
+--gausssoft.collections.FilterListIterator
- All Implemented Interfaces:
- Iterator, ListIterator, Serializable
- public class FilterListIterator
- extends Object
- implements ListIterator, Serializable
The FilterListIterator class contains another ListIterator, which it uses as it's basic source of data,
possibly transforming the data along the way or providing additional functionality.
Each method in this implementation calls the method with the same signature in the backing
list iterator.
This class can only be serialized if the backing list iterator is serializable.
- Author:
- Allan Crooks
- See Also:
ListIterator, Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
root
protected ListIterator root
- The backing list iterator.
FilterListIterator
public FilterListIterator(ListIterator root)
- Creates a new FilterListIterator.
- Parameters:
root - The list iterator to wrap this FilterListIterator around.- Throws:
NullPointerException - root is null.
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface ListIterator
next
public Object next()
- Specified by:
next in interface ListIterator
remove
public void remove()
- Specified by:
remove in interface ListIterator
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious in interface ListIterator
previous
public Object previous()
- Specified by:
previous in interface ListIterator
nextIndex
public int nextIndex()
- Specified by:
nextIndex in interface ListIterator
previousIndex
public int previousIndex()
- Specified by:
previousIndex in interface ListIterator
set
public void set(Object o)
- Specified by:
set in interface ListIterator
add
public void add(Object o)
- Specified by:
add in interface ListIterator