org.apache.commons.graph.domain.dependency
Class DependencyGraph

java.lang.Object
  extended byorg.apache.commons.graph.domain.basic.GraphWrapper
      extended byorg.apache.commons.graph.domain.basic.DirectedGraphWrapper
          extended byorg.apache.commons.graph.decorator.DDirectedGraph
              extended byorg.apache.commons.graph.domain.dependency.DependencyGraph
All Implemented Interfaces:
Acyclic, DirectedGraph, Graph, WeightedGraph

public class DependencyGraph
extends DDirectedGraph
implements Acyclic

Description of the Class


Field Summary
private  AcyclicContract acyclic
           
private  MutableDirectedGraph DAG
           
private  GraphFactory factory
           
private  java.util.Map vertices
           
private  DependencyVisitor visitor
           
 
Fields inherited from class org.apache.commons.graph.decorator.DDirectedGraph
 
Fields inherited from class org.apache.commons.graph.domain.basic.DirectedGraphWrapper
 
Constructor Summary
DependencyGraph()
          Constructor for the DependencyGraph object
 
Method Summary
 void addDependencies(java.lang.Object head, java.util.Collection deps)
          Adds a feature to the Dependencies attribute of the DependencyGraph object
 DependencyVertex findVertex(java.lang.Object o)
          Description of the Method
 java.util.List getSortedDependencies()
          Retrieve the vertices in a flattened, sorted, valid order.
 java.util.List getSortedDependencies(java.lang.Object head)
          Gets the sortedDependencies attribute of the DependencyGraph object
private  void init()
          Description of the Method
 
Methods inherited from class org.apache.commons.graph.decorator.DDirectedGraph
decorateGraph, getWeight, hasConnection, maximumSpanningForest, minimumSpanningForest, setWeight, transpose
 
Methods inherited from class org.apache.commons.graph.domain.basic.DirectedGraphWrapper
getInbound, getOutbound, getSource, getTarget, setDirGraph
 
Methods inherited from class org.apache.commons.graph.domain.basic.GraphWrapper
getEdges, getEdges, getVertices, getVertices, setGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.graph.DirectedGraph
getInbound, getOutbound, getSource, getTarget
 
Methods inherited from interface org.apache.commons.graph.Graph
getEdges, getEdges, getVertices, getVertices
 

Field Detail

factory

private GraphFactory factory

acyclic

private AcyclicContract acyclic

visitor

private DependencyVisitor visitor

vertices

private java.util.Map vertices

DAG

private MutableDirectedGraph DAG
Constructor Detail

DependencyGraph

public DependencyGraph()
Constructor for the DependencyGraph object

Method Detail

init

private void init()
Description of the Method


addDependencies

public void addDependencies(java.lang.Object head,
                            java.util.Collection deps)
                     throws GraphException,
                            CircularDependencyException
Adds a feature to the Dependencies attribute of the DependencyGraph object

Throws:
GraphException
CircularDependencyException

findVertex

public DependencyVertex findVertex(java.lang.Object o)
Description of the Method


getSortedDependencies

public java.util.List getSortedDependencies(java.lang.Object head)
Gets the sortedDependencies attribute of the DependencyGraph object


getSortedDependencies

public java.util.List getSortedDependencies()
Retrieve the vertices in a flattened, sorted, valid order.

Returns:
The list of vertices in a valid order.