com.phoenixst.plexus.traversals

Class GraphStructureIterator

public class GraphStructureIterator extends Object implements Iterator

An Iterator over the nodes and edges of a Graph ordered such that the endpoints of a Graph.Edge are always seen before the edge itself. This Iterator may be used to build a Graph with the same structure as some specified Graph, even if it has edges which point to other edges.

Since: 1.0

Version: $Revision: 1.7 $

Author: Ray A. Conner

Constructor Summary
GraphStructureIterator(Graph graph)
Creates a new GraphStructureIterator.
Method Summary
booleanhasNext()
booleanisEdge()
Returns whether or not the last object returned by GraphStructureIterator is a Graph.Edge in the Graph.
booleanisNode()
Returns whether or not the last object returned by GraphStructureIterator is a node in the Graph.
Objectnext()
voidremove()
Throws an UnsupportedOperationException.

Constructor Detail

GraphStructureIterator

public GraphStructureIterator(Graph graph)
Creates a new GraphStructureIterator.

Method Detail

hasNext

public boolean hasNext()

isEdge

public boolean isEdge()
Returns whether or not the last object returned by GraphStructureIterator is a Graph.Edge in the Graph.

isNode

public boolean isNode()
Returns whether or not the last object returned by GraphStructureIterator is a node in the Graph.

next

public Object next()

remove

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