com.phoenixst.plexus.util

Class FilteredEdgeIterator

public class FilteredEdgeIterator extends FilteredIterator

A simple filtered edge Iterator. Because this class must advance the underlying Iterator to function properly, implementing FilteredEdgeIterator may delegate to Graph.removeEdge( edge ) in some situations.

Since: 1.0

Version: $Revision: 1.9 $

Author: Ray A. Conner

Constructor Summary
FilteredEdgeIterator(Iterator edgeIter, Predicate edgePredicate)
Creates a new FilteredEdgeIterator which will throw an IllegalStateException if remove() is called after hasNext() without an intervening call to next().
FilteredEdgeIterator(Graph graph, Iterator edgeIter, Predicate edgePredicate)
Creates a new FilteredEdgeIterator which will have FilteredEdgeIterator delegate to Graph.removeEdge( edge ) if necessary.
Method Summary
protected voidremove(Object object)
If the Graph specified in the constructor is not null, this implementation will delegate to Graph.removeEdge( edge ) (which may invalidate this Iterator).

Constructor Detail

FilteredEdgeIterator

public FilteredEdgeIterator(Iterator edgeIter, Predicate edgePredicate)
Creates a new FilteredEdgeIterator which will throw an IllegalStateException if remove() is called after hasNext() without an intervening call to next().

FilteredEdgeIterator

public FilteredEdgeIterator(Graph graph, Iterator edgeIter, Predicate edgePredicate)
Creates a new FilteredEdgeIterator which will have FilteredEdgeIterator delegate to Graph.removeEdge( edge ) if necessary. Depending upon the Graph implementation, this may invalidate this Iterator.

Method Detail

remove

protected void remove(Object object)
If the Graph specified in the constructor is not null, this implementation will delegate to Graph.removeEdge( edge ) (which may invalidate this Iterator). If the Graph specified in the constructor is null, or if the other constructor is used, this implementation throws an IllegalStateException.

Description copied from class: FilteredIterator
{@inheritDoc }

See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.