org.apache.commons.graph.model
Class DirectedMutableGraph<V extends Vertex,E extends Edge<V>>

java.lang.Object
  extended by org.apache.commons.graph.model.BaseGraph<V,E>
      extended by org.apache.commons.graph.model.BaseMutableGraph<V,E>
          extended by org.apache.commons.graph.model.DirectedMutableGraph<V,E>
Type Parameters:
V - the Graph vertices type
E - the Graph edges type
All Implemented Interfaces:
DirectedGraph<V,E>, Graph<V,E>, MutableGraph<V,E>
Direct Known Subclasses:
DirectedMutableWeightedGraph

public class DirectedMutableGraph<V extends Vertex,E extends Edge<V>>
extends BaseMutableGraph<V,E>
implements DirectedGraph<V,E>

A memory-based implementation of a mutable directed Graph.


Constructor Summary
DirectedMutableGraph()
           
 
Method Summary
protected  void decorateAddEdge(E e)
          
protected  void decorateAddVertex(V v)
          
protected  void decorateRemoveEdge(E e)
          
protected  void decorateRemoveVertex(V v)
          
 Set<E> getInbound(V v)
          Returns the set of Edges which are inbound to the Vertex.
 Set<E> getOutbound(V v)
          Returns the set of Edges which lead away from the Vertex.
 
Methods inherited from class org.apache.commons.graph.model.BaseMutableGraph
addEdge, addVertex, removeEdge, removeVertex
 
Methods inherited from class org.apache.commons.graph.model.BaseGraph
getAdjacencyList, getAllEdges, getEdges, getEdges, getVertices, getVertices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.graph.Graph
getEdges, getEdges, getVertices, getVertices
 

Constructor Detail

DirectedMutableGraph

public DirectedMutableGraph()
Method Detail

getInbound

public Set<E> getInbound(V v)
Returns the set of Edges which are inbound to the Vertex.

Specified by:
getInbound in interface DirectedGraph<V extends Vertex,E extends Edge<V>>
Parameters:
v - the Vertex which inbound Edges have to be returned
Returns:
the set of Edges which are inbound to the Vertex.

getOutbound

public Set<E> getOutbound(V v)
Returns the set of Edges which lead away from the Vertex.

Specified by:
getOutbound in interface DirectedGraph<V extends Vertex,E extends Edge<V>>
Parameters:
v - the Vertex which outbound Edges have to be returned
Returns:
the set of Edges which lead away from the Vertex.

decorateAddVertex

protected void decorateAddVertex(V v)

Specified by:
decorateAddVertex in class BaseMutableGraph<V extends Vertex,E extends Edge<V>>

decorateRemoveVertex

protected void decorateRemoveVertex(V v)

Specified by:
decorateRemoveVertex in class BaseMutableGraph<V extends Vertex,E extends Edge<V>>

decorateAddEdge

protected void decorateAddEdge(E e)

Specified by:
decorateAddEdge in class BaseMutableGraph<V extends Vertex,E extends Edge<V>>

decorateRemoveEdge

protected void decorateRemoveEdge(E e)

Specified by:
decorateRemoveEdge in class BaseMutableGraph<V extends Vertex,E extends Edge<V>>


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.