org.apache.commons.graph.model
Class BaseMutableGraph<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>
Type Parameters:
V - the Graph vertices type
E - the Graph edges type
All Implemented Interfaces:
Graph<V,E>, MutableGraph<V,E>
Direct Known Subclasses:
DirectedMutableGraph

public abstract class BaseMutableGraph<V extends Vertex,E extends Edge<V>>
extends BaseGraph<V,E>
implements MutableGraph<V,E>

Basic abstract in-memory based of a simple mutable Graph implementation.


Constructor Summary
BaseMutableGraph()
           
 
Method Summary
 void addEdge(E e)
          Adds a feature to the Edge attribute of the MutableGraph object
 void addVertex(V v)
          Adds a feature to the Vertex attribute of the MutableGraph object.
protected abstract  void decorateAddEdge(E e)
           
protected abstract  void decorateAddVertex(V v)
           
protected abstract  void decorateRemoveEdge(E e)
           
protected abstract  void decorateRemoveVertex(V v)
           
 void removeEdge(E e)
          Removed the Edge from the MutableGraph object.
 void removeVertex(V v)
          Removes the Vertex from the MutableGraph object.
 
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

BaseMutableGraph

public BaseMutableGraph()
Method Detail

addVertex

public final void addVertex(V v)
Adds a feature to the Vertex attribute of the MutableGraph object.

Specified by:
addVertex in interface MutableGraph<V extends Vertex,E extends Edge<V>>
Parameters:
v - the Vertex has to be added in this MutableGraph instance.

decorateAddVertex

protected abstract void decorateAddVertex(V v)
Parameters:
v -

removeVertex

public final void removeVertex(V v)
Removes the Vertex from the MutableGraph object.

Specified by:
removeVertex in interface MutableGraph<V extends Vertex,E extends Edge<V>>
Parameters:
v - the Vertex has to be removed from this MutableGraph instance.

decorateRemoveVertex

protected abstract void decorateRemoveVertex(V v)
Parameters:
v -

addEdge

public final void addEdge(E e)
Adds a feature to the Edge attribute of the MutableGraph object

Specified by:
addEdge in interface MutableGraph<V extends Vertex,E extends Edge<V>>
Parameters:
e - the Edge has to be added in this MutableGraph instance.

decorateAddEdge

protected abstract void decorateAddEdge(E e)
Parameters:
e -

removeEdge

public final void removeEdge(E e)
Removed the Edge from the MutableGraph object.

Specified by:
removeEdge in interface MutableGraph<V extends Vertex,E extends Edge<V>>
Parameters:
e - the Edge has to be removed from this MutableGraph instance.

decorateRemoveEdge

protected abstract void decorateRemoveEdge(E e)
Parameters:
e -


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