Returns a non-negative hash value @param key @return
(int key)
| 322 | * @return |
| 323 | */ |
| 324 | public static int h(int key) |
| 325 | { |
| 326 | //http://stackoverflow.com/questions/664014/what-integer-hash-function-are-good-that-accepts-an-integer-hash-key |
| 327 | key = ((key >>> 16) ^ key ) & 0x45f9f3b; |
| 328 | key = ((key >>> 16) ^ key ) & 0x45f9f3b; |
| 329 | key = ((key >>> 16) ^ key ) ; |
| 330 | return key; |
| 331 | } |
| 332 | |
| 333 | |
| 334 | @Override |