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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
add a node to this graphboolean
containsNode
(@Nullable T n) int
getNode
(int number) int
int
int
Return the number ofimmediate predecessor
nodes of ngetPredNodeNumbers
(@Nullable T node) getPredNodes
(@Nullable T n) Return anIterator
over the immediate predecessor nodes of nint
Return the number ofimmediate successor
nodes of this Node in the GraphgetSuccNodeNumbers
(@Nullable T node) getSuccNodes
(@Nullable T n) Return an Iterator over the immediate successor nodes of nboolean
iterator()
void
removeAllIncidentEdges
(T node) void
removeEdge
(T src, T dst) void
removeIncomingEdges
(T node) void
removeNode
(T n) remove a node from this graphvoid
remove a node and all its incident edgesvoid
removeOutgoingEdges
(T node) stream()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ExtensionGraph
-
-
Method Details
-
iterator
-
stream
-
getNumberOfNodes
public int getNumberOfNodes()- Specified by:
getNumberOfNodes
in interfaceNodeManager<T>
- Returns:
- the number of nodes in this graph
-
addNode
Description copied from interface:NodeManager
add a node to this graph- Specified by:
addNode
in interfaceNodeManager<T>
-
removeNode
Description copied from interface:NodeManager
remove a node from this graph- Specified by:
removeNode
in interfaceNodeManager<T>
- Throws:
UnsupportedOperationException
-
containsNode
- Specified by:
containsNode
in interfaceNodeManager<T>
- Returns:
- true iff the graph contains the specified node
-
getNumber
- Specified by:
getNumber
in interfaceNumberedNodeManager<T>
-
getNode
- Specified by:
getNode
in interfaceNumberedNodeManager<T>
-
getMaxNumber
public int getMaxNumber()- Specified by:
getMaxNumber
in interfaceNumberedNodeManager<T>
-
iterateNodes
- Specified by:
iterateNodes
in interfaceNumberedNodeManager<T>
- Returns:
- iterator of nodes with the numbers in set s
-
getPredNodes
Description copied from interface:EdgeManager
Return anIterator
over the immediate predecessor nodes of nThis method never returns
null
.- Specified by:
getPredNodes
in interfaceEdgeManager<T>
- Returns:
- an
Iterator
over the immediate predecessor nodes of this Node.
-
getPredNodeCount
Description copied from interface:EdgeManager
Return the number ofimmediate predecessor
nodes of n- Specified by:
getPredNodeCount
in interfaceEdgeManager<T>
- Returns:
- the number of immediate predecessors of n.
-
getPredNodeNumbers
- Specified by:
getPredNodeNumbers
in interfaceNumberedEdgeManager<T>
- Returns:
- the numbers identifying the immediate predecessors of node
-
getSuccNodes
Description copied from interface:EdgeManager
Return an Iterator over the immediate successor nodes of nThis method never returns
null
.- Specified by:
getSuccNodes
in interfaceEdgeManager<T>
- Returns:
- an Iterator over the immediate successor nodes of n
-
getSuccNodeCount
Description copied from interface:EdgeManager
Return the number ofimmediate successor
nodes of this Node in the Graph- Specified by:
getSuccNodeCount
in interfaceEdgeManager<T>
- Returns:
- the number of immediate successor Nodes of this Node in the Graph.
-
getSuccNodeNumbers
- Specified by:
getSuccNodeNumbers
in interfaceNumberedEdgeManager<T>
- Returns:
- the numbers identifying the immediate successors of node
-
addEdge
- Specified by:
addEdge
in interfaceEdgeManager<T>
-
removeEdge
- Specified by:
removeEdge
in interfaceEdgeManager<T>
- Throws:
UnsupportedOperationException
-
removeAllIncidentEdges
- Specified by:
removeAllIncidentEdges
in interfaceEdgeManager<T>
- Throws:
UnsupportedOperationException
-
removeIncomingEdges
- Specified by:
removeIncomingEdges
in interfaceEdgeManager<T>
- Throws:
UnsupportedOperationException
-
removeOutgoingEdges
- Specified by:
removeOutgoingEdges
in interfaceEdgeManager<T>
- Throws:
UnsupportedOperationException
-
hasEdge
- Specified by:
hasEdge
in interfaceEdgeManager<T>
-
removeNodeAndEdges
Description copied from interface:Graph
remove a node and all its incident edges- Specified by:
removeNodeAndEdges
in interfaceGraph<T>
- Throws:
UnsupportedOperationException
- if the graph implementation does not allow removal
-