Package com.ibm.wala.util.graph
Interface NodeManager<T>
-
- Type Parameters:
T
- the type of nodes thisNodeManager
tracks.
- 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 fullCollection
interface, so that it takes less code to implement a newNodeManager
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addNode(T n)
add a node to this graphboolean
containsNode(T n)
int
getNumberOfNodes()
java.util.Iterator<T>
iterator()
void
removeNode(T n)
remove a node from this graph
-
-
-
Method Detail
-
iterator
java.util.Iterator<T> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<T>
- Returns:
- an
Iterator
of 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
-
-