Class AbstractLabeledGraph<T,U>
java.lang.Object
com.ibm.wala.util.graph.AbstractGraph<T>
com.ibm.wala.util.graph.labeled.AbstractLabeledGraph<T,U>
- All Implemented Interfaces:
EdgeManager<T>, Graph<T>, LabeledEdgeManager<T,U>, LabeledGraph<T, U>, NodeManager<T>, Iterable<T>
public abstract class AbstractLabeledGraph<T,U>
extends AbstractGraph<T>
implements LabeledGraph<T,U>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadds an edge with some labelgetEdgeLabels(T src, T dst) Returns a set of all labeled edges between node src and node dstprotected abstract LabeledEdgeManager<T, U> getPredLabels(T N) intgetPredNodeCount(T N, U label) Return the number ofimmediate predecessornodes of this Node in the Graph on edges with some label.getPredNodes(T N, U label) Return an Iterator over the immediate predecessor nodes of this Node in the Graph on edges with some label.getSuccLabels(T N) intgetSuccNodeCount(T N, U label) Return the number ofimmediate successornodes of this Node in the GraphgetSuccNodes(T N, U label) Return an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.booleanvoidremoveEdge(T src, T dst, U label) Methods inherited from class AbstractGraph
addEdge, addNode, containsNode, edgeString, getNodeManager, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, stream, toStringModifier and TypeMethodDescriptionvoidvoidadd a node to this graphbooleancontainsNode(T n) protected StringedgeString(T from, T to) protected abstract NodeManager<T> intintReturn the number ofimmediate predecessornodes of ngetPredNodes(T n) Return anIteratorover the immediate predecessor nodes of nintReturn the number ofimmediate successornodes of this Node in the GraphgetSuccNodes(T n) Return an Iterator over the immediate successor nodes of nbooleaniterator()protected StringnodeString(T n, boolean forEdge) 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, spliteratorMethods inherited from interface LabeledEdgeManager
getDefaultLabel, getPredNodesModifier and TypeMethodDescriptionSets the default object used as label for operations where no specific edge label is provided.getPredNodes(T N, Predicate<U> pred)
-
Constructor Details
-
AbstractLabeledGraph
public AbstractLabeledGraph()
-
-
Method Details
-
getEdgeManager
- Specified by:
getEdgeManagerin classAbstractGraph<T>- Returns:
- the object which manages edges in the graph
-
addEdge
Description copied from interface:LabeledEdgeManageradds an edge with some label- Specified by:
addEdgein interfaceLabeledEdgeManager<T,U>
-
getPredLabels
- Specified by:
getPredLabelsin interfaceLabeledEdgeManager<T,U> - Returns:
- the labels on edges whose destination is N
-
getPredNodeCount
Description copied from interface:LabeledEdgeManagerReturn the number ofimmediate predecessornodes of this Node in the Graph on edges with some label.- Specified by:
getPredNodeCountin interfaceLabeledEdgeManager<T,U> - Returns:
- the number of immediate predecessor Nodes of this Node in the Graph.
-
getPredNodes
Description copied from interface:LabeledEdgeManagerReturn an Iterator over the immediate predecessor nodes of this Node in the Graph on edges with some label.This method never returns
null.- Specified by:
getPredNodesin interfaceLabeledEdgeManager<T,U> - Returns:
- an Iterator over the immediate predecessor nodes of this Node.
-
getSuccLabels
- Specified by:
getSuccLabelsin interfaceLabeledEdgeManager<T,U> - Returns:
- the labels on edges whose source is N
-
getSuccNodeCount
Description copied from interface:LabeledEdgeManagerReturn the number ofimmediate successornodes of this Node in the Graph- Specified by:
getSuccNodeCountin interfaceLabeledEdgeManager<T,U> - Returns:
- the number of immediate successor Nodes of this Node in the Graph.
-
getSuccNodes
Description copied from interface:LabeledEdgeManagerReturn an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.This method never returns
null.- Specified by:
getSuccNodesin interfaceLabeledEdgeManager<T,U> - Returns:
- an Iterator over the immediate successor Nodes of this Node.
-
hasEdge
-
removeEdge
- Specified by:
removeEdgein interfaceLabeledEdgeManager<T,U>
-
getEdgeLabels
Description copied from interface:LabeledEdgeManagerReturns a set of all labeled edges between node src and node dst- Specified by:
getEdgeLabelsin interfaceLabeledEdgeManager<T,U> - Parameters:
src- source node of the edgedst- target node of the edge- Returns:
- Set of edge labels
-