public class BasicEdgeManager<T> extends Object implements EdgeManager<T>
EdgeManager. Does not support edge
deletion.| Constructor and Description |
|---|
BasicEdgeManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(T src,
T dst) |
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) |
void |
removeAllIncidentEdges(T node) |
void |
removeEdge(T src,
T dst) |
void |
removeIncomingEdges(T node) |
void |
removeOutgoingEdges(T node) |
public Iterator<T> getPredNodes(T n)
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.public int getPredNodeCount(T n)
EdgeManagerimmediate predecessor nodes of ngetPredNodeCount in interface EdgeManager<T>public Iterator<T> getSuccNodes(T n)
EdgeManagerThis method never returns null.
getSuccNodes in interface EdgeManager<T>public int getSuccNodeCount(T n)
EdgeManagerimmediate successor nodes of this Node in the GraphgetSuccNodeCount in interface EdgeManager<T>public void addEdge(T src, T dst)
addEdge in interface EdgeManager<T>public void removeEdge(T src, T dst) throws UnsupportedOperationException
removeEdge in interface EdgeManager<T>UnsupportedOperationExceptionpublic void removeAllIncidentEdges(T node) throws UnsupportedOperationException
removeAllIncidentEdges in interface EdgeManager<T>UnsupportedOperationExceptionpublic void removeIncomingEdges(T node) throws UnsupportedOperationException
removeIncomingEdges in interface EdgeManager<T>UnsupportedOperationExceptionpublic void removeOutgoingEdges(T node) throws UnsupportedOperationException
removeOutgoingEdges in interface EdgeManager<T>UnsupportedOperationExceptionpublic boolean hasEdge(T src, T dst)
hasEdge in interface EdgeManager<T>