com.phoenixst.plexus.util
public class SingletonTraverser extends Object implements Traverser
Traverser
over a single Edge
. SingletonTraverser and SingletonTraverser delegate to Graph.removeNode( node )
and Graph.removeEdge( edge )
respectively.
An alternate
constructor
is provided to explicitly make the created
Traverser
unmodifiable.
Since: 1.0
Version: $Revision: 1.9 $
Constructor Summary | |
---|---|
SingletonTraverser(Object endpoint, Graph.Edge edge)
Creates a new unmodifiable SingletonTraverser .
| |
SingletonTraverser(Graph graph, Object endpoint, Graph.Edge edge)
Creates a new modifiable SingletonTraverser .
|
Method Summary | |
---|---|
Graph.Edge | getEdge() |
boolean | hasNext() |
Object | next() |
void | remove() |
void | removeEdge() |
SingletonTraverser
.
If this constructor is used, SingletonTraverser and SingletonTraverser will throw
UnsupportedOperationExceptions
.
Parameters: endpoint the endpoint of the edge over which the
returned Traverser
iterates.
edge the edge over which the returned
Traverser
iterates.
SingletonTraverser
.
Parameters: graph the graph containing the edge over which the
returned Traverser
iterates.
endpoint the endpoint of the edge over which the
returned Traverser
iterates.
edge the edge over which the returned
Traverser
iterates.