com.phoenixst.plexus.util

Class SingletonEdgeIterator

public class SingletonEdgeIterator extends Object implements Iterator

An Iterator over a single Edge. SingletonEdgeIterator delegates to Graph.removeEdge( edge ).

An alternate constructor is provided to explicitly make the created Iterator unmodifiable.

Since: 1.0

Version: $Revision: 1.7 $

Author: Ray A. Conner

Constructor Summary
SingletonEdgeIterator(Graph.Edge edge)
Creates a new unmodifiable SingletonEdgeIterator.
SingletonEdgeIterator(Graph graph, Graph.Edge edge)
Creates a new modifiable SingletonEdgeIterator.
Method Summary
booleanhasNext()
Objectnext()
voidremove()

Constructor Detail

SingletonEdgeIterator

public SingletonEdgeIterator(Graph.Edge edge)
Creates a new unmodifiable SingletonEdgeIterator. If this constructor is used, SingletonEdgeIterator will throw an UnsupportedOperationException.

Parameters: edge the edge over which the returned Iterator iterates.

SingletonEdgeIterator

public SingletonEdgeIterator(Graph graph, Graph.Edge edge)
Creates a new modifiable SingletonEdgeIterator.

Parameters: graph the graph containing the edge over which the returned Iterator iterates. edge the edge over which the returned Iterator iterates.

Method Detail

hasNext

public boolean hasNext()

next

public Object next()

remove

public void remove()
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.