T
- the type of nodes in this graph.public interface Graph<T> extends NodeManager<T>, EdgeManager<T>
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
forEach, spliterator
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
void removeNodeAndEdges(T n) throws UnsupportedOperationException
UnsupportedOperationException
- if the graph implementation does not allow removal