2020
10-10
10-10
详谈Map的key、value值的数据类型不能为基本类型的原因
interfaceMap<K,V>Map源码/***Returnsthehashcodevalueforthismapentry.Thehashcode*ofamapentry<tt>e</tt>isdefinedtobe:<pre>*(e.getKey()==null?0:e.getKey().hashCode())^*(e.getValue()==null?0:e.getValue().hashCode())*</pre>*Thisensuresthat<tt>e1.equals(e2)</tt>impliesthat*<tt>e1.hashCode()==e2.hashCode()</tt>for...
继续阅读 >