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

java.lang.Object
  extended by uk.ed.inf.graph.compound.base.BaseCompoundNodeFactory
      extended by uk.ed.inf.graph.compound.impl.CompoundNodeFactory
All Implemented Interfaces:
IBasicNodeFactory<BaseCompoundNode,BaseCompoundEdge>, ICompoundNodeFactory<BaseCompoundNode,BaseCompoundEdge>

public class CompoundNodeFactory
extends BaseCompoundNodeFactory


Constructor Summary
CompoundNodeFactory(CompoundNode parent)
           
 
Method Summary
 CompoundNode createNode()
           
 CompoundGraph getGraph()
          Get the graph to which this factory acts upon.
 BaseCompoundNode getParentNode()
           
 CompoundNode newNode(BaseCompoundNode parent, int nodeIndex)
          Creates the new node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundNodeFactory

CompoundNodeFactory(CompoundNode parent)
Method Detail

newNode

public CompoundNode newNode(BaseCompoundNode parent,
                            int nodeIndex)
Description copied from class: BaseCompoundNodeFactory
Creates the new node. The node must be correctly created and owned by the ChildCompoundGraph of the parent node.

Specified by:
newNode in class BaseCompoundNodeFactory
Parameters:
parent - the parent node the child graph of which this node will be added.
nodeIndex - the new index to use when creating the node.
Returns:
the newly created node which must be valid and correctly formed.

createNode

public CompoundNode createNode()
Specified by:
createNode in interface IBasicNodeFactory<BaseCompoundNode,BaseCompoundEdge>
Overrides:
createNode in class BaseCompoundNodeFactory

getGraph

public CompoundGraph getGraph()
Description copied from interface: IBasicNodeFactory
Get the graph to which this factory acts upon.

Specified by:
getGraph in interface IBasicNodeFactory<BaseCompoundNode,BaseCompoundEdge>
Specified by:
getGraph in interface ICompoundNodeFactory<BaseCompoundNode,BaseCompoundEdge>
Specified by:
getGraph in class BaseCompoundNodeFactory
Returns:
The owning graph, cannot be null.

getParentNode

public BaseCompoundNode getParentNode()
Specified by:
getParentNode in interface ICompoundNodeFactory<BaseCompoundNode,BaseCompoundEdge>
Specified by:
getParentNode in class BaseCompoundNodeFactory