public class DominatorTreeAdapter<N> extends Object implements DirectedGraph<DominatorNode<N>>
This might be useful if e.g. you want to apply a DirectedGraph analysis such as the PseudoTopologicalOrderer to a DominatorTree.
Constructor and Description |
---|
DominatorTreeAdapter(DominatorTree<N> dt) |
Modifier and Type | Method and Description |
---|---|
List<DominatorNode<N>> |
getHeads()
Returns a list of entry points for this graph.
|
List<DominatorNode<N>> |
getPredsOf(DominatorNode<N> node)
Returns a list of predecessors for the given node in the graph.
|
List<DominatorNode<N>> |
getSuccsOf(DominatorNode<N> node)
Returns a list of successors for the given node in the graph.
|
List<DominatorNode<N>> |
getTails()
Returns a list of exit points for this graph.
|
Iterator<DominatorNode<N>> |
iterator()
Returns an iterator for the nodes in this graph.
|
int |
size()
Returns the node count for this graph.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DominatorTreeAdapter(DominatorTree<N> dt)
public List<DominatorNode<N>> getHeads()
DirectedGraph
getHeads
in interface DirectedGraph<DominatorNode<N>>
public List<DominatorNode<N>> getTails()
DirectedGraph
getTails
in interface DirectedGraph<DominatorNode<N>>
public List<DominatorNode<N>> getPredsOf(DominatorNode<N> node)
DirectedGraph
getPredsOf
in interface DirectedGraph<DominatorNode<N>>
public List<DominatorNode<N>> getSuccsOf(DominatorNode<N> node)
DirectedGraph
getSuccsOf
in interface DirectedGraph<DominatorNode<N>>
public Iterator<DominatorNode<N>> iterator()
DirectedGraph
iterator
in interface Iterable<DominatorNode<N>>
iterator
in interface DirectedGraph<DominatorNode<N>>
public int size()
DirectedGraph
size
in interface DirectedGraph<DominatorNode<N>>