com.ibm.wala.util.graph.impl
Class SlowNumberedNodeManager<T>
java.lang.Object
com.ibm.wala.util.graph.impl.SlowNumberedNodeManager<T>
- All Implemented Interfaces:
- NodeManager<T>, NumberedNodeManager<T>, java.lang.Iterable<T>
public class SlowNumberedNodeManager<T>
- extends java.lang.Object
- implements NumberedNodeManager<T>
An object which manages node numbers via a mapping.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SlowNumberedNodeManager
public SlowNumberedNodeManager()
getNumber
public int getNumber(T obj)
- Specified by:
getNumber in interface NumberedNodeManager<T>
getNode
public T getNode(int number)
- Specified by:
getNode in interface NumberedNodeManager<T>
getMaxNumber
public int getMaxNumber()
- Specified by:
getMaxNumber in interface NumberedNodeManager<T>
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>
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
containsNode
public boolean containsNode(T N)
- Specified by:
containsNode in interface NodeManager<T>
- Returns:
- true iff the graph contains the specified node
iterateNodes
public java.util.Iterator<T> iterateNodes(IntSet s)
- Specified by:
iterateNodes in interface NumberedNodeManager<T>
- Returns:
- iterator of nodes with the numbers in set s