com.phoenixst.plexus.util
public class FilteredNodeIterator extends FilteredIterator
Iterator
. Because this class
must advance the underlying Iterator
to function
properly, implementing FilteredNodeIterator may delegate to Graph.removeNode( node )
in some situations.
Since: 1.0
Version: $Revision: 1.8 $
Constructor Summary | |
---|---|
FilteredNodeIterator(Iterator nodeIter, Predicate nodePredicate)
Creates a new FilteredNodeIterator which will
throw an IllegalStateException if
remove() is called after hasNext()
without an intervening call to next() . | |
FilteredNodeIterator(Graph graph, Iterator nodeIter, Predicate nodePredicate)
Creates a new FilteredNodeIterator which will
have FilteredNodeIterator delegate to Graph.removeNode( node ) if
necessary. |
Method Summary | |
---|---|
protected void | remove(Object object)
If the Graph specified in the constructor is not
null , this implementation will delegate to Graph.removeNode( node ) (which may
invalidate this Iterator ). |
FilteredNodeIterator
which will
throw an IllegalStateException
if
remove()
is called after hasNext()
without an intervening call to next()
.FilteredNodeIterator
which will
have FilteredNodeIterator delegate to Graph.removeNode( node )
if
necessary. Depending upon the Graph
implementation, this may invalidate this
Iterator
.Graph
specified in the constructor is not
null
, this implementation will delegate to Graph.removeNode( node )
(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 }