com.ibm.wala.util.graph
Interface NodeManager<T>

Type Parameters:
T - the type of nodes this NodeManager tracks.
All Superinterfaces:
java.lang.Iterable<T>
All Known Subinterfaces:
CallGraph, ControlFlowGraph<I,T>, Graph<T>, IFlowGraph, ISDG, ISupergraph<T,P>, LabeledGraph<T,U>, NumberedGraph<T>, NumberedNodeManager<T>, OrderedMultiGraph<T>
All Known Implementing Classes:
AbstractCFG, AbstractDemandFlowGraph, AbstractFlowGraph, AbstractGraph, AbstractInterproceduralCFG, AbstractLabeledGraph, AbstractNumberedGraph, AbstractNumberedLabeledGraph, AstCallGraph, AstInducedCFG, AstTranslator.AstCFG, AstTranslator.IncipientCFG, BackwardsSupergraph, BasicCallGraph, BasicHeapGraph, BasicNodeManager, BasicOrderedMultiGraph, CISDG, ControlDependenceGraph, CrossLanguageCallGraph, DelegatingCFG, DelegatingExplicitCallGraph, DelegatingGraph, DelegatingNumberedGraph, DelegatingNumberedNodeManager, DemandPointerFlowGraph, DemandValueFlowGraph, ExplicitCallGraph, ExplodedControlFlowGraph, ExplodedInterproceduralCFG, HeapGraph, ICFGSupergraph, InducedCFG, InterproceduralCFG, InvertedGraph, InvertedNumberedGraph, JSCallGraph, JSInducedCFG, PartialCallGraph, PDG, PrunedCFG, SDG, ShrikeCFG, SimpleDemandPointerFlowGraph, SlowNumberedNodeManager, SlowSparseNumberedGraph, SlowSparseNumberedLabeledGraph, SparseNumberedGraph, SSACFG

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 full Collection interface, so that it takes less code to implement a new NodeManager.


Method Summary
 void addNode(T n)
          add a node to this graph
 boolean 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 interface java.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