commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1136187 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java
Date Wed, 15 Jun 2011 20:46:47 GMT
Author: simonetripodi
Date: Wed Jun 15 20:46:47 2011
New Revision: 1136187

URL: http://svn.apache.org/viewvc?rev=1136187&view=rev
Log:
missed to collect edges in the proper set

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java?rev=1136187&r1=1136186&r2=1136187&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseMutableGraph.java
Wed Jun 15 20:46:47 2011
@@ -43,7 +43,7 @@ public abstract class BaseMutableGraph<V
     /**
      * {@inheritDoc}
      */
-    public void addVertex( V v )
+    public final void addVertex( V v )
     {
         if ( v == null )
         {
@@ -69,7 +69,7 @@ public abstract class BaseMutableGraph<V
     /**
      * {@inheritDoc}
      */
-    public void removeVertex( V v )
+    public final void removeVertex( V v )
     {
         if ( v == null )
         {
@@ -95,10 +95,11 @@ public abstract class BaseMutableGraph<V
     /**
      * {@inheritDoc}
      */
-    public void addEdge( E e )
+    public final void addEdge( E e )
     {
         checkEdge( e );
 
+        getAllEdges().add( e );
         getAdjacencyList().get( e.getHead() ).add( e );
 
         decorateAddEdge( e );
@@ -114,10 +115,11 @@ public abstract class BaseMutableGraph<V
     /**
      * {@inheritDoc}
      */
-    public void removeEdge( E e )
+    public final void removeEdge( E e )
     {
         checkEdge( e );
 
+        getAllEdges().remove( e );
         getAdjacencyList().get( e.getHead() ).remove( e );
 
         decorateRemoveEdge( e );



Mime
View raw message