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

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

public class DRAGraphWithEditIAsGraph
extends DRAGraphWithAddVertexIAsGraph
implements ConstructableGraphProp


Constructor Summary
DRAGraphWithEditIAsGraph()
          constructor for an empty graph (uses a standard graph implementation from the OR-Objects library)
DRAGraphWithEditIAsGraph(drasys.or.graph.EditI draGraph)
           
 
Method Summary
protected  Edge addDraEdge(Object fromKey, Object toKey)
          Add an edge, given the keys of the incident nodes
 Edge addEdge(Node from, Node to)
          Add an edge between two given nodes.
 void ensureEdgeCapacity(int edgeCapacity)
          Reserve storage for given number of edges.
 drasys.or.graph.EditI getEditI()
           
protected  Object getNewEdgeKey()
           
 
Methods inherited from class net.sourceforge.combean.adapters.drasys.graph.DRAGraphWithAddVertexIAsGraph
addDraVertex, addNode, ensureNodeCapacity, freeze, 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.prop.AddNodeGraphProp
addNode, ensureNodeCapacity
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.Graph
getEdgeClass, getNodeClass
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.prop.Freezable
freeze
 

Constructor Detail

DRAGraphWithEditIAsGraph

public DRAGraphWithEditIAsGraph()
constructor for an empty graph (uses a standard graph implementation from the OR-Objects library)


DRAGraphWithEditIAsGraph

public DRAGraphWithEditIAsGraph(drasys.or.graph.EditI draGraph)
Parameters:
draGraph -
Method Detail

addEdge

public final Edge addEdge(Node from,
                          Node to)
Description copied from interface: AddEdgeGraphProp
Add an edge between two given nodes.

Specified by:
addEdge in interface AddEdgeGraphProp
Parameters:
from - the source node of the edge.
to - the target node of the edge.
Returns:
the edge which has been inserted into the graph.

getEditI

public final drasys.or.graph.EditI getEditI()
Returns:
the wrapped EditI object

ensureEdgeCapacity

public void ensureEdgeCapacity(int edgeCapacity)
Description copied from interface: AddEdgeGraphProp
Reserve storage for given number of edges.

Specified by:
ensureEdgeCapacity in interface AddEdgeGraphProp
Parameters:
edgeCapacity - the number of edges for which memory shall be reserved,

addDraEdge

protected Edge addDraEdge(Object fromKey,
                          Object toKey)
                   throws drasys.or.graph.DuplicateEdgeException,
                          drasys.or.graph.VertexNotFoundException
Add an edge, given the keys of the incident nodes

Parameters:
fromKey - the key of the source node
toKey - the key of the target node
Returns:
the added edge
Throws:
drasys.or.graph.DuplicateEdgeException
drasys.or.graph.VertexNotFoundException

getNewEdgeKey

protected Object getNewEdgeKey()
Returns:
a key for a newly added edge