uk.ed.inf.graph.compound.impl
Class SubCompoundGraphBuilder

java.lang.Object
  extended by uk.ed.inf.graph.compound.base.BaseSubCompoundGraphBuilder
      extended by uk.ed.inf.graph.compound.impl.SubCompoundGraphBuilder
All Implemented Interfaces:
ISubCompoundGraphBuilder<BaseCompoundNode,BaseCompoundEdge>

public class SubCompoundGraphBuilder
extends BaseSubCompoundGraphBuilder


Constructor Summary
SubCompoundGraphBuilder(CompoundGraph graph)
          Construct the builder, providing it with a list of nodes and edges with which to populate the subgraph that will be constructed.
 
Method Summary
protected  void addAdditionalEdges()
           
protected  void addAdditionalNodes()
           
 CompoundGraph getGraph()
           
 SubCompoundGraph getSubgraph()
          Retrieve the created subgraph.
protected  void newSubgraph()
           
 
Methods inherited from class uk.ed.inf.graph.compound.base.BaseSubCompoundGraphBuilder
addIncidentEdges, buildSubgraph, expandChildNodes, getEdgeList, getNodeList, hasAdditionalNodes, setEdgeList, setNodeList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubCompoundGraphBuilder

SubCompoundGraphBuilder(CompoundGraph graph)
Construct the builder, providing it with a list of nodes and edges with which to populate the subgraph that will be constructed.

Parameters:
graph - the graph to which the subgraph will refer, cannot be null.
Throws:
java.lang.NullPointerException - if any of the the parameters are null.
Method Detail

newSubgraph

protected void newSubgraph()
Specified by:
newSubgraph in class BaseSubCompoundGraphBuilder

getSubgraph

public SubCompoundGraph getSubgraph()
Description copied from class: BaseSubCompoundGraphBuilder
Retrieve the created subgraph. If the subgraph has not been build then this method will fail.

Specified by:
getSubgraph in interface ISubCompoundGraphBuilder<BaseCompoundNode,BaseCompoundEdge>
Specified by:
getSubgraph in class BaseSubCompoundGraphBuilder
Returns:
The created subgraph, cannot be null.

getGraph

public CompoundGraph getGraph()
Specified by:
getGraph in interface ISubCompoundGraphBuilder<BaseCompoundNode,BaseCompoundEdge>
Specified by:
getGraph in class BaseSubCompoundGraphBuilder

addAdditionalEdges

protected void addAdditionalEdges()
Specified by:
addAdditionalEdges in class BaseSubCompoundGraphBuilder

addAdditionalNodes

protected void addAdditionalNodes()
Specified by:
addAdditionalNodes in class BaseSubCompoundGraphBuilder