MCPcopy
hub / github.com/wangzheng0822/algo / hash

Method hash

java/18_hashtable/HashTable.java:102–105  ·  view source on GitHub ↗

散列函数 参考hashmap散列函数 @param key @return

(Object key)

Source from the content-addressed store, hash-verified

100 * @return
101 */
102 private int hash(Object key) {
103 int h;
104 return (key == null) ? 0 : ((h = key.hashCode()) ^ (h >>> 16)) % table.length;
105 }
106
107 /**
108 * 扩容

Callers 4

putMethod · 0.95
resizeMethod · 0.95
removeMethod · 0.95
getMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected