public class DelegatingGraph<T> extends Object implements Graph<T>
| Constructor and Description |
|---|
DelegatingGraph(Graph<T> delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(T src,
T dst) |
void |
addNode(T n)
add a node to this graph
|
boolean |
containsNode(T N) |
int |
getNumberOfNodes() |
int |
getPredNodeCount(T N)
Return the number of
immediate predecessor nodes of n |
Iterator<T> |
getPredNodes(T N)
Return an
Iterator over the immediate predecessor nodes of n |
int |
getSuccNodeCount(T N)
Return the number of
immediate successor nodes of this Node in the Graph |
Iterator<T> |
getSuccNodes(T N)
Return an Iterator over the immediate successor nodes of n
|
boolean |
hasEdge(T src,
T dst) |
Iterator<T> |
iterator() |
void |
removeAllIncidentEdges(T node) |
void |
removeEdge(T src,
T dst) |
void |
removeIncomingEdges(T node) |
void |
removeNode(T n)
remove a node from this graph
|
void |
removeNodeAndEdges(T N)
remove a node and all its incident edges
|
void |
removeOutgoingEdges(T node) |
Stream<T> |
stream() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic void addEdge(T src, T dst) throws IllegalArgumentException
addEdge in interface EdgeManager<T>IllegalArgumentExceptionpublic void addNode(T n)
NodeManageraddNode in interface NodeManager<T>public boolean containsNode(T N)
containsNode in interface NodeManager<T>public int getNumberOfNodes()
getNumberOfNodes in interface NodeManager<T>public int getPredNodeCount(T N) throws IllegalArgumentException
EdgeManagerimmediate predecessor nodes of ngetPredNodeCount in interface EdgeManager<T>IllegalArgumentExceptionpublic Iterator<T> getPredNodes(T N) throws IllegalArgumentException
EdgeManagerIterator over the immediate predecessor nodes of n
This method never returns null.
getPredNodes in interface EdgeManager<T>Iterator over the immediate predecessor nodes of this Node.IllegalArgumentExceptionpublic int getSuccNodeCount(T N) throws IllegalArgumentException
EdgeManagerimmediate successor nodes of this Node in the GraphgetSuccNodeCount in interface EdgeManager<T>IllegalArgumentExceptionpublic Iterator<T> getSuccNodes(T N) throws IllegalArgumentException
EdgeManagerThis method never returns null.
getSuccNodes in interface EdgeManager<T>IllegalArgumentExceptionpublic boolean hasEdge(T src, T dst)
hasEdge in interface EdgeManager<T>public Stream<T> stream()
stream in interface NodeManager<T>Stream of the nodes in this graphpublic void removeAllIncidentEdges(T node) throws IllegalArgumentException
removeAllIncidentEdges in interface EdgeManager<T>IllegalArgumentExceptionpublic void removeEdge(T src, T dst) throws IllegalArgumentException
removeEdge in interface EdgeManager<T>IllegalArgumentExceptionpublic void removeIncomingEdges(T node) throws IllegalArgumentException
removeIncomingEdges in interface EdgeManager<T>IllegalArgumentExceptionpublic void removeNode(T n)
NodeManagerremoveNode in interface NodeManager<T>public void removeNodeAndEdges(T N) throws IllegalArgumentException
GraphremoveNodeAndEdges in interface Graph<T>IllegalArgumentExceptionpublic void removeOutgoingEdges(T node) throws IllegalArgumentException
removeOutgoingEdges in interface EdgeManager<T>IllegalArgumentException