Package com.ibm.wala.util.graph.labeled
Interface LabeledEdgeManager<T,U>
-
- Type Parameters:
T- type of nodes in this graphU- types of edge labels.
- All Superinterfaces:
EdgeManager<T>
- All Known Subinterfaces:
LabeledGraph<T,U>,NumberedLabeledEdgeManager<T,U>,NumberedLabeledGraph<T,I>
- All Known Implementing Classes:
AbstractLabeledGraph,AbstractNumberedLabeledGraph,SlowSparseNumberedLabeledGraph,SparseNumberedLabeledEdgeManager
public interface LabeledEdgeManager<T,U> extends EdgeManager<T>
An object which tracks labeled edges in a graph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddEdge(T src, T dst, U label)adds an edge with some label@Nullable UgetDefaultLabel()Sets the default object used as label for operations where no specific edge label is provided.Set<? extends U>getEdgeLabels(T src, T dst)Returns a set of all labeled edges between node src and node dstIterator<? extends 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.default Iterator<T>getPredNodes(T N, Predicate<U> pred)Iterator<T>getPredNodes(T N, U label)Return an Iterator over the immediate predecessor nodes of this Node in the Graph on edges with some label.Iterator<? extends U>getSuccLabels(T N)intgetSuccNodeCount(T N, U label)Return the number ofimmediate successornodes of this Node in the GraphIterator<? extends T>getSuccNodes(T N, U label)Return an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.booleanhasEdge(T src, T dst, U label)voidremoveEdge(T src, T dst, U label)-
Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
-
-
-
-
Method Detail
-
getDefaultLabel
@Nullable U getDefaultLabel()
Sets the default object used as label for operations where no specific edge label is provided. This is due to compatibility with the EdgeManager interface
-
getPredNodes
Iterator<T> getPredNodes(T N, U label)
Return an Iterator over the immediate predecessor nodes of this Node in the Graph on edges with some label.This method never returns
null.- Returns:
- an Iterator over the immediate predecessor nodes of this Node.
-
getPredLabels
Iterator<? extends U> getPredLabels(T N)
- Returns:
- the labels on edges whose destination is N
-
getPredNodeCount
int getPredNodeCount(T N, U label)
Return the number ofimmediate predecessornodes of this Node in the Graph on edges with some label.- Returns:
- the number of immediate predecessor Nodes of this Node in the Graph.
-
getSuccNodes
Iterator<? extends T> getSuccNodes(T N, U label)
Return an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.This method never returns
null.- Returns:
- an Iterator over the immediate successor Nodes of this Node.
-
getSuccLabels
Iterator<? extends U> getSuccLabels(T N)
- Returns:
- the labels on edges whose source is N
-
getSuccNodeCount
int getSuccNodeCount(T N, U label)
Return the number ofimmediate successornodes of this Node in the Graph- Returns:
- the number of immediate successor Nodes of this Node in the Graph.
-
removeEdge
void removeEdge(T src, T dst, U label) throws UnsupportedOperationException
- Throws:
UnsupportedOperationException
-
-