Class ExtensionGraph<T>
java.lang.Object
com.ibm.wala.util.graph.impl.ExtensionGraph<T>
- All Implemented Interfaces:
EdgeManager<T>, Graph<T>, NodeManager<T>, NumberedEdgeManager<T>, NumberedGraph<T>, NumberedNodeManager<T>, Iterable<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidadd a node to this graphbooleancontainsNode(@Nullable T n) intgetNode(int number) intintintReturn the number ofimmediate predecessornodes of ngetPredNodeNumbers(@Nullable T node) getPredNodes(@Nullable T n) Return anIteratorover the immediate predecessor nodes of nintReturn the number ofimmediate successornodes of this Node in the GraphgetSuccNodeNumbers(@Nullable T node) getSuccNodes(@Nullable T n) Return an Iterator over the immediate successor nodes of nbooleaniterator()voidremoveAllIncidentEdges(T node) voidremoveEdge(T src, T dst) voidremoveIncomingEdges(T node) voidremoveNode(T n) remove a node from this graphvoidremove a node and all its incident edgesvoidremoveOutgoingEdges(T node) stream()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
ExtensionGraph
-
-
Method Details
-
iterator
-
stream
-
getNumberOfNodes
public int getNumberOfNodes()- Specified by:
getNumberOfNodesin interfaceNodeManager<T>- Returns:
- the number of nodes in this graph
-
addNode
Description copied from interface:NodeManageradd a node to this graph- Specified by:
addNodein interfaceNodeManager<T>
-
removeNode
Description copied from interface:NodeManagerremove a node from this graph- Specified by:
removeNodein interfaceNodeManager<T>- Throws:
UnsupportedOperationException
-
containsNode
- Specified by:
containsNodein interfaceNodeManager<T>- Returns:
- true iff the graph contains the specified node
-
getNumber
- Specified by:
getNumberin interfaceNumberedNodeManager<T>
-
getNode
- Specified by:
getNodein interfaceNumberedNodeManager<T>
-
getMaxNumber
public int getMaxNumber()- Specified by:
getMaxNumberin interfaceNumberedNodeManager<T>
-
iterateNodes
- Specified by:
iterateNodesin interfaceNumberedNodeManager<T>- Returns:
- iterator of nodes with the numbers in set s
-
getPredNodes
Description copied from interface:EdgeManagerReturn anIteratorover the immediate predecessor nodes of nThis method never returns
null.- Specified by:
getPredNodesin interfaceEdgeManager<T>- Returns:
- an
Iteratorover the immediate predecessor nodes of this Node.
-
getPredNodeCount
Description copied from interface:EdgeManagerReturn the number ofimmediate predecessornodes of n- Specified by:
getPredNodeCountin interfaceEdgeManager<T>- Returns:
- the number of immediate predecessors of n.
-
getPredNodeNumbers
- Specified by:
getPredNodeNumbersin interfaceNumberedEdgeManager<T>- Returns:
- the numbers identifying the immediate predecessors of node
-
getSuccNodes
Description copied from interface:EdgeManagerReturn an Iterator over the immediate successor nodes of nThis method never returns
null.- Specified by:
getSuccNodesin interfaceEdgeManager<T>- Returns:
- an Iterator over the immediate successor nodes of n
-
getSuccNodeCount
Description copied from interface:EdgeManagerReturn the number ofimmediate successornodes of this Node in the Graph- Specified by:
getSuccNodeCountin interfaceEdgeManager<T>- Returns:
- the number of immediate successor Nodes of this Node in the Graph.
-
getSuccNodeNumbers
- Specified by:
getSuccNodeNumbersin interfaceNumberedEdgeManager<T>- Returns:
- the numbers identifying the immediate successors of node
-
addEdge
- Specified by:
addEdgein interfaceEdgeManager<T>
-
removeEdge
- Specified by:
removeEdgein interfaceEdgeManager<T>- Throws:
UnsupportedOperationException
-
removeAllIncidentEdges
- Specified by:
removeAllIncidentEdgesin interfaceEdgeManager<T>- Throws:
UnsupportedOperationException
-
removeIncomingEdges
- Specified by:
removeIncomingEdgesin interfaceEdgeManager<T>- Throws:
UnsupportedOperationException
-
removeOutgoingEdges
- Specified by:
removeOutgoingEdgesin interfaceEdgeManager<T>- Throws:
UnsupportedOperationException
-
hasEdge
- Specified by:
hasEdgein interfaceEdgeManager<T>
-
removeNodeAndEdges
Description copied from interface:Graphremove a node and all its incident edges- Specified by:
removeNodeAndEdgesin interfaceGraph<T>- Throws:
UnsupportedOperationException- if the graph implementation does not allow removal
-