commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1134820 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/WeightedGraphWrapper.java
Date Sat, 11 Jun 2011 23:17:29 GMT
Author: simonetripodi
Date: Sat Jun 11 23:17:29 2011
New Revision: 1134820

URL: http://svn.apache.org/viewvc?rev=1134820&view=rev
Log:
minor code format

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

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/WeightedGraphWrapper.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/WeightedGraphWrapper.java?rev=1134820&r1=1134819&r2=1134820&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/WeightedGraphWrapper.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/domain/basic/WeightedGraphWrapper.java
Sat Jun 11 23:17:29 2011
@@ -31,9 +31,10 @@ import org.apache.commons.graph.*;
  * @param <E> the Graph edges type
  */
 public class WeightedGraphWrapper<V extends Vertex, WE extends WeightedEdge>
-     extends GraphWrapper<V, WE>
-     implements WeightedGraph<V, WE>
+    extends GraphWrapper<V, WE>
+    implements WeightedGraph<V, WE>
 {
+
     private final Map<WE, Number> weights = new HashMap<WE, Number>(); // EDGE
X WEIGHT
 
     /**
@@ -41,19 +42,19 @@ public class WeightedGraphWrapper<V exte
      *
      * @param graph
      */
-    public WeightedGraphWrapper(Graph<V, WE> graph)
+    public WeightedGraphWrapper( Graph<V, WE> graph )
     {
-        super(graph);
+        super( graph );
     }
 
     /**
      * Gets the weight attribute of the WeightedGraphWrapper object
      */
-    public Number getWeight(WE e)
+    public Number getWeight( WE e )
     {
-        if (weights.containsKey(e))
+        if ( weights.containsKey( e ) )
         {
-            return weights.get(e);
+            return weights.get( e );
         }
         else
         {
@@ -64,9 +65,9 @@ public class WeightedGraphWrapper<V exte
     /**
      * Sets the weight attribute of the WeightedGraphWrapper object
      */
-    public void setWeight(WE e, Number weight)
+    public void setWeight( WE e, Number weight )
     {
-        weights.put(e, weight);
+        weights.put( e, weight );
     }
 
 }



Mime
View raw message