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.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1539955 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e8dfe7c8ca
commit
dcfe8f4a37
|
@ -773,28 +773,6 @@ abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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() {
|
public Comparator<? super K> comparator() {
|
||||||
|
|
Loading…
Reference in New Issue