commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1539955 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
Date Fri, 08 Nov 2013 09:13:31 GMT
Author: tn
Date: Fri Nov  8 09:13:30 2013
New Revision: 1539955

URL: http://svn.apache.org/r1539955
Log:
Remove spurious hashCode method, which does the same as the inherited one from AbstractMap
with the only different that the iterator is sorted, which does not make a difference at all.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java?rev=1539955&r1=1539954&r2=1539955&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/trie/AbstractPatriciaTrie.java
Fri Nov  8 09:13:30 2013
@@ -773,28 +773,6 @@ abstract class AbstractPatriciaTrie<K, V
         }
     }
 
-    /**
-     * Gets the standard Map hashCode.
-     *
-     * @return the hash code defined in the Map interface
-     */
-    @Override
-    public int hashCode() {
-        int total = 0;
-        final Iterator<Entry<K, V>> it = new MyEntryIterator();
-
-        while (it.hasNext()) {
-            total += it.next().hashCode();
-        }
-        return total;
-    }
-
-    private class MyEntryIterator extends TrieIterator<Map.Entry<K,V>> {
-        public Map.Entry<K,V> next() {
-            return nextEntry();
-        }
-    }
-
     //-----------------------------------------------------------------------
 
     public Comparator<? super K> comparator() {



Mime
View raw message