You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/06/11 23:11:27 UTC

svn commit: r1134759 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/UndirectedGraphImpl.java

Author: simonetripodi
Date: Sat Jun 11 21:11:27 2011
New Revision: 1134759

URL: http://svn.apache.org/viewvc?rev=1134759&view=rev
Log:
internal UndirectedGraphImpl collections can be final

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/UndirectedGraphImpl.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/UndirectedGraphImpl.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/UndirectedGraphImpl.java?rev=1134759&r1=1134758&r2=1134759&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/UndirectedGraphImpl.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/UndirectedGraphImpl.java Sat Jun 11 21:11:27 2011
@@ -39,12 +39,12 @@ public class UndirectedGraphImpl<V exten
 	     MutableGraph<V, WE>,
 	     InvocationHandler
 {
-    private Set<V> vertices = new HashSet<V>();
-    private Set<WE> edges = new HashSet<WE>();
+    private final Set<V> vertices = new HashSet<V>();
+    private final Set<WE> edges = new HashSet<WE>();
 
-    private Map<WE, Set<V>> edgeVerts = new HashMap<WE, Set<V>>();// EDGE X SET( VERTS )
-    private Map<V, Set<WE>> vertEdges = new HashMap<V, Set<WE>>();// VERTEX X SET( EDGE )
-    private Map<WE, Number> edgeWeights = new HashMap<WE, Number>(); // EDGE X WEIGHT
+    private final Map<WE, Set<V>> edgeVerts = new HashMap<WE, Set<V>>();// EDGE X SET( VERTS )
+    private final Map<V, Set<WE>> vertEdges = new HashMap<V, Set<WE>>();// VERTEX X SET( EDGE )
+    private final Map<WE, Number> edgeWeights = new HashMap<WE, Number>(); // EDGE X WEIGHT
 
     /**
      * Constructor for the UndirectedGraphImpl object