net.sourceforge.combean.adapters.drasys.graph
Class DRAGraphWithEditIAsGraph
java.lang.Object
net.sourceforge.combean.adapters.drasys.graph.DRAGraphAsGraph
net.sourceforge.combean.adapters.drasys.graph.DRAGraphWithAddVertexIAsGraph
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
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.Freezable |
freeze |
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
-
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 nodetoKey
- 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