Class DelegatingGraph<T>
java.lang.Object
com.ibm.wala.util.graph.impl.DelegatingGraph<T>
- All Implemented Interfaces:
EdgeManager<T>, Graph<T>, NodeManager<T>, Iterable<T>
- Direct Known Subclasses:
PartialCallGraph
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidadd a node to this graphbooleancontainsNode(@Nullable T N) intintReturn the number ofimmediate predecessornodes of ngetPredNodes(@Nullable T N) Return anIteratorover the immediate predecessor nodes of nintReturn the number ofimmediate successornodes of this Node in the GraphgetSuccNodes(@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()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
DelegatingGraph
-
-
Method Details
-
addEdge
- Specified by:
addEdgein interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
addNode
Description copied from interface:NodeManageradd a node to this graph- Specified by:
addNodein interfaceNodeManager<T>
-
containsNode
- Specified by:
containsNodein interfaceNodeManager<T>- Returns:
- true iff the graph contains the specified node
-
getNumberOfNodes
public int getNumberOfNodes()- Specified by:
getNumberOfNodesin interfaceNodeManager<T>- Returns:
- the number of nodes in this graph
-
toString
-
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.
- Throws:
IllegalArgumentException
-
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. - Throws:
IllegalArgumentException
-
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.
- Throws:
IllegalArgumentException
-
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
- Throws:
IllegalArgumentException
-
hasEdge
- Specified by:
hasEdgein interfaceEdgeManager<T>
-
iterator
-
stream
-
removeAllIncidentEdges
- Specified by:
removeAllIncidentEdgesin interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
removeEdge
- Specified by:
removeEdgein interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
removeIncomingEdges
- Specified by:
removeIncomingEdgesin interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
removeNode
Description copied from interface:NodeManagerremove a node from this graph- Specified by:
removeNodein interfaceNodeManager<T>
-
removeNodeAndEdges
Description copied from interface:Graphremove a node and all its incident edges- Specified by:
removeNodeAndEdgesin interfaceGraph<T>- Throws:
IllegalArgumentException
-
removeOutgoingEdges
- Specified by:
removeOutgoingEdgesin interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-