org.apache.commons.graph.factory
Class GraphFactory

java.lang.Object
  extended byorg.apache.commons.graph.factory.GraphFactory

public class GraphFactory
extends java.lang.Object

Description of the Class


Constructor Summary
GraphFactory()
          Constructor for the GraphFactory object
 
Method Summary
 DirectedGraph makeDirectedGraph(Contract[] contracts, boolean isWeighted, DirectedGraph graph)
          makeDirectedGraph
private  java.lang.Object makeGraph(Contract[] contracts, java.lang.reflect.InvocationHandler baseGraph, java.lang.Class baseGraphType, boolean isWeighted)
          makeGraph
 MutableDirectedGraph makeMutableDirectedGraph(Contract[] contracts, boolean isWeighted, DirectedGraph graph)
          makeMutableDirectedGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphFactory

public GraphFactory()
Constructor for the GraphFactory object

Method Detail

makeGraph

private java.lang.Object makeGraph(Contract[] contracts,
                                   java.lang.reflect.InvocationHandler baseGraph,
                                   java.lang.Class baseGraphType,
                                   boolean isWeighted)
                            throws GraphException
makeGraph

Parameters:
contracts - Which contracts to enforce.
baseGraph - Is the actual *GraphImpl which will be at the core of the Proxy.
baseGraphType - Interface which is returned.
isWeighted - Does the graph handle Weights?
Throws:
GraphException

makeDirectedGraph

public DirectedGraph makeDirectedGraph(Contract[] contracts,
                                       boolean isWeighted,
                                       DirectedGraph graph)
                                throws GraphException
makeDirectedGraph

Parameters:
contracts - - Array of Contracts this Graph should meet.
isWeighted - - If true, the Graph will implement the WeightedGraph interface.
graph - - If it is provided, the graph will initially be equal to the graph.
Throws:
GraphException

makeMutableDirectedGraph

public MutableDirectedGraph makeMutableDirectedGraph(Contract[] contracts,
                                                     boolean isWeighted,
                                                     DirectedGraph graph)
                                              throws GraphException
makeMutableDirectedGraph

Parameters:
contracts - - Array of Contracts this Graph should meet.
isWeighted - - If true, the Graph will implement the WeightedGraph interface.
graph - - If it is provided, the graph will initially be equal to the graph.
Throws:
GraphException