com.ibm.wala.util.graph.impl
Class InvertingEdgeManager<T>

java.lang.Object
  extended by com.ibm.wala.util.graph.impl.InvertingEdgeManager<T>
All Implemented Interfaces:
EdgeManager<T>

public class InvertingEdgeManager<T>
extends java.lang.Object
implements EdgeManager<T>

An edge manager that reverses the edges in a graph


Constructor Summary
InvertingEdgeManager(EdgeManager<T> original)
           
 
Method Summary
 void addEdge(T src, T dst)
           
 int getPredNodeCount(T N)
          Return the number of immediate predecessor nodes of this Node in the Graph.
 java.util.Iterator<? extends T> getPredNodes(T N)
          Return an Iterator over the immediate predecessor nodes of this Node in the Graph.
 int getSuccNodeCount(T N)
          Return the number of immediate successor nodes of this Node in the Graph
 java.util.Iterator<? extends T> getSuccNodes(T N)
          Return an Iterator over the immediate successor nodes of this Node in the Graph
 boolean hasEdge(T src, T dst)
           
 void removeAllIncidentEdges(T node)
           
 void removeEdge(T src, T dst)
           
 void removeIncomingEdges(T node)
           
 void removeOutgoingEdges(T node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvertingEdgeManager

public InvertingEdgeManager(EdgeManager<T> original)
Method Detail

getPredNodes

public java.util.Iterator<? extends T> getPredNodes(T N)
                                             throws java.lang.IllegalArgumentException
Description copied from interface: EdgeManager
Return an Iterator over the immediate predecessor nodes of this Node in the Graph. This method never returns null.

Specified by:
getPredNodes in interface EdgeManager<T>
Returns:
an Iterator over the immediate predecessor nodes of this Node.
Throws:
java.lang.IllegalArgumentException

getPredNodeCount

public int getPredNodeCount(T N)
                     throws java.lang.IllegalArgumentException
Description copied from interface: EdgeManager
Return the number of immediate predecessor nodes of this Node in the Graph.

Specified by:
getPredNodeCount in interface EdgeManager<T>
Returns:
the number of immediate predecessor Nodes of this Node in the Graph.
Throws:
java.lang.IllegalArgumentException

getSuccNodes

public java.util.Iterator<? extends T> getSuccNodes(T N)
                                             throws java.lang.IllegalArgumentException
Description copied from interface: EdgeManager
Return an Iterator over the immediate successor nodes of this Node in the Graph

This method never returns null.

Specified by:
getSuccNodes in interface EdgeManager<T>
Returns:
an Iterator over the immediate successor Nodes of this Node.
Throws:
java.lang.IllegalArgumentException

getSuccNodeCount

public int getSuccNodeCount(T N)
                     throws java.lang.IllegalArgumentException
Description copied from interface: EdgeManager
Return the number of immediate successor nodes of this Node in the Graph

Specified by:
getSuccNodeCount in interface EdgeManager<T>
Returns:
the number of immediate successor Nodes of this Node in the Graph.
Throws:
java.lang.IllegalArgumentException

addEdge

public void addEdge(T src,
                    T dst)
             throws java.lang.IllegalArgumentException
Specified by:
addEdge in interface EdgeManager<T>
Throws:
java.lang.IllegalArgumentException

removeEdge

public void removeEdge(T src,
                       T dst)
                throws java.lang.IllegalArgumentException
Specified by:
removeEdge in interface EdgeManager<T>
Throws:
java.lang.IllegalArgumentException

hasEdge

public boolean hasEdge(T src,
                       T dst)
Specified by:
hasEdge in interface EdgeManager<T>

removeAllIncidentEdges

public void removeAllIncidentEdges(T node)
                            throws java.lang.IllegalArgumentException
Specified by:
removeAllIncidentEdges in interface EdgeManager<T>
Throws:
java.lang.IllegalArgumentException

removeIncomingEdges

public void removeIncomingEdges(T node)
                         throws java.lang.IllegalArgumentException
Specified by:
removeIncomingEdges in interface EdgeManager<T>
Throws:
java.lang.IllegalArgumentException

removeOutgoingEdges

public void removeOutgoingEdges(T node)
                         throws java.lang.IllegalArgumentException
Specified by:
removeOutgoingEdges in interface EdgeManager<T>
Throws:
java.lang.IllegalArgumentException