gausssoft.collections
Class FilterIterator
java.lang.Object
|
+--gausssoft.collections.FilterIterator
- All Implemented Interfaces:
- Iterator, Serializable
- Direct Known Subclasses:
- AltFilterIterator
- public class FilterIterator
- extends Object
- implements Iterator, Serializable
The FilterIterator class contains another Iterator
, 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
iterator.
This class can only be serialized if the backing iterator is serializable.
- Author:
- Allan Crooks
- See Also:
Iterator
, Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
root
protected Iterator root
- The backing iterator.
FilterIterator
public FilterIterator(Iterator root)
- Creates a new FilterIterator.
- Parameters:
root
- The iterator to wrap this FilterIterator around.- Throws:
NullPointerException
- iterator is null
.
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
next
public Object next()
- Specified by:
next
in interface Iterator
remove
public void remove()
- Specified by:
remove
in interface Iterator