T - the type of nodes in this graph.public interface Graph<T> extends NodeManager<T>, EdgeManager<T>
We choose to define a Graph as a composition of a NodeManager and an EdgeManager, which track nodes and edges, respectively. This way, in many cases we can compose
separate NodeManager and EdgeManager implementations to create Graph
implementations, using delegation.
| Modifier and Type | Method and Description |
|---|---|
void |
removeNodeAndEdges(T n)
remove a node and all its incident edges
|
addNode, containsNode, getNumberOfNodes, iterator, removeNode, streamforEach, spliteratoraddEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesvoid removeNodeAndEdges(T n) throws UnsupportedOperationException
UnsupportedOperationException - if the graph implementation does not allow removal