2008-03-19

解释一句代码的含义(hashtable中的)

关键字: jdk源代码
public synchronized boolean containsKey(Object key) { 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)) { return true; } } ...
insky
搜索本博客
博客分类
最近加入圈子
存档
最新评论