public abstract class AbstractDirectedGraph<N extends DirectedGraphNode,E extends DirectedGraphEdge<? extends N,? extends N>> extends AbstractGraph implements DirectedGraph<N,E>
id
Constructor and Description |
---|
AbstractDirectedGraph() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAddEdge(N source,
N target) |
protected abstract java.util.Map<? extends DirectedGraphElement,? extends DirectedGraphElement> |
cloneFrom(DirectedGraph<N,E> graph)
The returned mapping satisfies:
map.keySet().containsAll(graph.getNodes()) and
map.keySet().containsAll(graph.getEdges())
|
int |
compareTo(DirectedGraph<N,E> o) |
protected abstract AbstractDirectedGraph<N,E> |
getEmptyClone() |
AbstractDirectedGraph<?,?> |
getGraph() |
java.util.Collection<E> |
getInEdges(DirectedGraphNode node) |
java.util.Collection<E> |
getOutEdges(DirectedGraphNode node) |
void |
graphElementAdded(java.lang.Object element) |
void |
graphElementChanged(java.lang.Object element) |
void |
graphElementRemoved(java.lang.Object element) |
abstract void |
removeEdge(DirectedGraphEdge edge)
Removes the given edge from the graph.
|
protected void |
removeSurroundingEdges(N node) |
equals, getEdges, hashCode, removeFromEdges, removeNodeFromCollection
getAttributeMap, getLabel, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEdges, getNodes, removeNode
equals, getLabel, hashCode
getAttributeMap
public AbstractDirectedGraph<?,?> getGraph()
getGraph
in interface DirectedGraphElement
protected abstract AbstractDirectedGraph<N,E> getEmptyClone()
protected abstract java.util.Map<? extends DirectedGraphElement,? extends DirectedGraphElement> cloneFrom(DirectedGraph<N,E> graph)
graph
- public abstract void removeEdge(DirectedGraphEdge edge)
DirectedGraph
removeEdge
in interface DirectedGraph<N extends DirectedGraphNode,E extends DirectedGraphEdge<? extends N,? extends N>>
protected void removeSurroundingEdges(N node)
public java.util.Collection<E> getInEdges(DirectedGraphNode node)
getInEdges
in interface DirectedGraph<N extends DirectedGraphNode,E extends DirectedGraphEdge<? extends N,? extends N>>
public java.util.Collection<E> getOutEdges(DirectedGraphNode node)
getOutEdges
in interface DirectedGraph<N extends DirectedGraphNode,E extends DirectedGraphEdge<? extends N,? extends N>>
public void graphElementAdded(java.lang.Object element)
graphElementAdded
in class AbstractGraph
public void graphElementRemoved(java.lang.Object element)
graphElementRemoved
in class AbstractGraph
public void graphElementChanged(java.lang.Object element)
graphElementChanged
in class AbstractGraph
public int compareTo(DirectedGraph<N,E> o)
compareTo
in interface java.lang.Comparable<DirectedGraph<N extends DirectedGraphNode,E extends DirectedGraphEdge<? extends N,? extends N>>>