net.sourceforge.combean.adapters.drasys.graph
Class DRAGraphWithAddVertexIAsGraph

Package class diagram package DRAGraphWithAddVertexIAsGraph
java.lang.Object
  extended by net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsGraph
      extended by net.sourceforge.combean.adapters.drasys.graph.DRAGraphWithAddVertexIAsGraph
All Implemented Interfaces:
Graph, AddNodeGraphProp, DirectedEdgeNeighborhoodGraphProp, Freezable, GlobalEdgesGraphProp, GlobalNodesGraphProp, IncomingEdgeNeighborhoodGraphProp, NeighborhoodGraphProp, OutgoingEdgeNeighborhoodGraphProp
Direct Known Subclasses:
DRAGraphWithEditIAsGraph

public class DRAGraphWithAddVertexIAsGraph
extends DRAGraphAsGraph
implements AddNodeGraphProp


Constructor Summary
DRAGraphWithAddVertexIAsGraph(drasys.or.graph.AddVertexI draGraph)
           
 
Method Summary
protected  Node addDraVertex()
           
 Node addNode()
          Add a node to the graph.
 void ensureNodeCapacity(int nodeCapacity)
          Reserve storage for a given number of nodes
 void freeze()
          This method should be called after modifications to the graph are done.
protected  Object getNewNodeKey()
           
 
Methods inherited from class net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsGraph
convertToEdge, convertToNode, getAllEdgesIterator, getAllNodesIterator, getDraGraph, getEdgeClass, getEdgeValue, getFirstNode, getIncidentEdges, getIncomingEdges, getNodeClass, getNumEdges, getNumNodes, getOtherNode, getOutgoingEdges, getSecondNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.Graph
getEdgeClass, getNodeClass
 

Constructor Detail

DRAGraphWithAddVertexIAsGraph

public DRAGraphWithAddVertexIAsGraph(drasys.or.graph.AddVertexI draGraph)
Parameters:
draGraph -
Method Detail

addNode

public final Node addNode()
Description copied from interface: AddNodeGraphProp
Add a node to the graph.

Specified by:
addNode in interface AddNodeGraphProp
Returns:
the node which has been added.

ensureNodeCapacity

public final void ensureNodeCapacity(int nodeCapacity)
Description copied from interface: AddNodeGraphProp
Reserve storage for a given number of nodes

Specified by:
ensureNodeCapacity in interface AddNodeGraphProp
Parameters:
nodeCapacity - the number of nodes for which memory shall be reserved.

freeze

public final void freeze()
Description copied from interface: Freezable
This method should be called after modifications to the graph are done. It allows the implementing class to cleanup data structures which are only needed for the dynamic modification of the graph.

Specified by:
freeze in interface Freezable

addDraVertex

protected Node addDraVertex()
                     throws drasys.or.graph.DuplicateVertexException
Throws:
drasys.or.graph.DuplicateVertexException

getNewNodeKey

protected Object getNewNodeKey()
Returns:
a key for a newly added node