com.ibm.wala.util.graph.impl
Class BasicNodeManager<T>

java.lang.Object
  extended by com.ibm.wala.util.graph.impl.BasicNodeManager<T>
All Implemented Interfaces:
NodeManager<T>, java.lang.Iterable<T>

public class BasicNodeManager<T>
extends java.lang.Object
implements NodeManager<T>

Simple implementation of a NodeManager.


Constructor Summary
BasicNodeManager()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicNodeManager

public BasicNodeManager()
Method Detail

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface NodeManager<T>
Specified by:
iterator in interface java.lang.Iterable<T>
Returns:
an Iterator of the nodes in this graph

getNumberOfNodes

public int getNumberOfNodes()
Specified by:
getNumberOfNodes in interface NodeManager<T>
Returns:
the number of nodes in this graph

addNode

public void addNode(T n)
Description copied from interface: NodeManager
add a node to this graph

Specified by:
addNode in interface NodeManager<T>

removeNode

public void removeNode(T n)
Description copied from interface: NodeManager
remove a node from this graph

Specified by:
removeNode in interface NodeManager<T>

containsNode

public boolean containsNode(T N)
Specified by:
containsNode in interface NodeManager<T>
Returns:
true iff the graph contains the specified node