commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcospera...@apache.org
Subject svn commit: r1360580 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java
Date Thu, 12 Jul 2012 08:44:57 GMT
Author: marcosperanza
Date: Thu Jul 12 08:44:56 2012
New Revision: 1360580

URL: http://svn.apache.org/viewvc?rev=1360580&view=rev
Log:
Fixed 'EqualsHashCode' checkstyle error, no functionl modifications.

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

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java?rev=1360580&r1=1360579&r2=1360580&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java
Thu Jul 12 08:44:56 2012
@@ -143,6 +143,18 @@ public abstract class BaseGraph<V, E>
         return adjacencyList;
     }
 
+    @Override
+    public int hashCode()
+    {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ( ( adjacencyList == null ) ? 0 : adjacencyList.hashCode()
);
+        result = prime * result + ( ( allEdges == null ) ? 0 : allEdges.hashCode() );
+        result = prime * result + ( ( indexedEdges == null ) ? 0 : indexedEdges.hashCode()
);
+        result = prime * result + ( ( indexedVertices == null ) ? 0 : indexedVertices.hashCode()
);
+        return result;
+    }
+
     /**
      * {@inheritDoc}
      */



Mime
View raw message