मैं एक hashtable के लिए डाल विधि के जावा के कार्यान्वयन के माध्यम से जा रहा था और इस में आए:क्यों एक HashTable दुकान जावा में तालिका में कुंजी के हैश मान करता
// Makes sure the key is not already in the hashtable.
Entry tab[] = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
for (Entry<K,V> e = tab[index] ; e != null ; e = e.next) {
if ((e.hash == hash) && e.key.equals(key)) {
V old = e.value;
e.value = value;
return old;
}
}
जब मैं एक महत्वपूर्ण समझते हैं कि टकराव की जांच करने के लिए आवश्यक है, जावा कुंजी के हैश मान को संग्रहीत क्यों कर रहा है और इसे जांच रहा है?