gausssoft.collections
Class AltFilterIterator

java.lang.Object
  |
  +--gausssoft.collections.FilterIterator
        |
        +--gausssoft.collections.AltFilterIterator
All Implemented Interfaces:
Iterator, Serializable

public class AltFilterIterator
extends FilterIterator

This class is used by the AltFilter classes for iterators.

This class simply takes a collection as well as a backing iterator at construction time, takes a backing collection, which when this object's remove() method is invoked, it calls the Collection.remove(Object) method.

Author:
Allan Crooks
See Also:
Iterator, AltFilterCollection, AltFilterList, AltFilterIterator, Serialized Form

Field Summary
protected  Collection coll
          The backing collection to use for removing objects.
 
Fields inherited from class gausssoft.collections.FilterIterator
root
 
Constructor Summary
AltFilterIterator(Collection coll, Iterator itr)
          Creates a new AltFilterIterator.
 
Method Summary
 Object next()
           
 void remove()
           
 
Methods inherited from class gausssoft.collections.FilterIterator
hasNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coll

protected final Collection coll
The backing collection to use for removing objects.
Constructor Detail

AltFilterIterator

public AltFilterIterator(Collection coll,
                         Iterator itr)
Creates a new AltFilterIterator.
Parameters:
coll - The backing collection to use for removing objects.
itr - The backing iterator to use.
Method Detail

next

public Object next()
Overrides:
next in class FilterIterator

remove

public void remove()
Overrides:
remove in class FilterIterator