Package com.ibm.wala.util.graph.impl
Class BasicNodeManager<T>
- java.lang.Object
-
- 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 aNodeManager.
-
-
Constructor Summary
Constructors Constructor Description BasicNodeManager()
-
Method Summary
All Methods Instance Methods Concrete 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
public java.util.Iterator<T> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<T>- Specified by:
iteratorin interfaceNodeManager<T>- Returns:
- an
Iteratorof the nodes in this graph
-
getNumberOfNodes
public int getNumberOfNodes()
- Specified by:
getNumberOfNodesin interfaceNodeManager<T>- Returns:
- the number of nodes in this graph
-
addNode
public void addNode(T n)
Description copied from interface:NodeManageradd a node to this graph- Specified by:
addNodein interfaceNodeManager<T>
-
removeNode
public void removeNode(T n)
Description copied from interface:NodeManagerremove a node from this graph- Specified by:
removeNodein interfaceNodeManager<T>
-
containsNode
public boolean containsNode(T N)
- Specified by:
containsNodein interfaceNodeManager<T>- Returns:
- true iff the graph contains the specified node
-
-