Package com.ibm.wala.util.graph
Interface NodeManager<T>
- Type Parameters:
T- the type of nodes thisNodeManagertracks.
- All Superinterfaces:
Iterable<T>
- All Known Subinterfaces:
Graph<T>,LabeledGraph<T,,U> NumberedGraph<T>,NumberedLabeledGraph<T,,I> NumberedNodeManager<T>,OrderedMultiGraph<T>
- All Known Implementing Classes:
AbstractGraph,AbstractLabeledGraph,AbstractNumberedGraph,AbstractNumberedLabeledGraph,BasicNodeManager,BasicOrderedMultiGraph,DelegatingGraph,DelegatingNumberedGraph,DelegatingNumberedNodeManager,EdgeFilteredNumberedGraph,ExtensionGraph,InvertedGraph,InvertedNumberedGraph,SelfLoopAddedGraph,SlowNumberedNodeManager,SlowSparseNumberedGraph,SlowSparseNumberedLabeledGraph,SparseNumberedGraph
An object which tracks graph nodes.
This is effectively a stripped-down collection interface. We choose to avoid using the full
Collection interface, so that
it takes less code to implement a new NodeManager.-
Method Summary
Modifier and TypeMethodDescriptionvoidadd a node to this graphbooleancontainsNode(T n) intiterator()voidremoveNode(T n) remove a node from this graphMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
iterator
-
getNumberOfNodes
int getNumberOfNodes()- Returns:
- the number of nodes in this graph
-
addNode
add a node to this graph -
removeNode
remove a node from this graph- Throws:
UnsupportedOperationException
-
containsNode
- Returns:
- true iff the graph contains the specified node
-