public class BasicDirectedGraph<T> extends java.lang.Object implements IDirectedGraph<T>
| Constructor and Description |
|---|
BasicDirectedGraph() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(T source,
T successor)
Add a new edge to the graph.
|
void |
addNode(T node)
Add a node to the graph.
|
java.util.Iterator<T> |
getNodes()
Which are the nodes of the graph?
|
java.util.Iterator<T> |
getSucessors(T source)
Given a node 'source', which are this nodes children, i.e.
|
public java.util.Iterator<T> getSucessors(T source)
getSucessors in interface IDirectedGraph<T>source - the source nodepublic void addEdge(T source, T successor)
source - successor - public void addNode(T node)
node - public java.util.Iterator<T> getNodes()
getNodes in interface IDirectedGraph<T>