Package com.ibm.wala.util.graph
Interface NodeManager<T>
-
- Type Parameters:
T- the type of nodes thisNodeManagertracks.
- All Superinterfaces:
java.lang.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
public interface NodeManager<T> extends java.lang.Iterable<T>An object which tracks graph nodes. This is effectively a stripped-down collection interface. We choose to avoid using the fullCollectioninterface, so that it takes less code to implement a newNodeManager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddNode(T n)add a node to this graphbooleancontainsNode(T n)intgetNumberOfNodes()java.util.Iterator<T>iterator()voidremoveNode(T n)remove a node from this graph
-
-
-
Method Detail
-
iterator
java.util.Iterator<T> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<T>- Returns:
- an
Iteratorof the nodes in this graph
-
getNumberOfNodes
int getNumberOfNodes()
- Returns:
- the number of nodes in this graph
-
addNode
void addNode(T n)
add a node to this graph
-
removeNode
void removeNode(T n) throws java.lang.UnsupportedOperationException
remove a node from this graph- Throws:
java.lang.UnsupportedOperationException
-
containsNode
boolean containsNode(T n)
- Returns:
- true iff the graph contains the specified node
-
-