daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public V put(K key, V value) {
  2.    int hash = hash(key.hashCode());
  3.    int i = indexFor(hash, table.length);
  4.    .....
  5. }
  6.  
  7.  
  8. static int hash(int h) {
  9.    h ^= (h >>> 20) ^ (h >>> 12);
  10.    return h ^ (h >>> 7) ^ (h >>> 4);
  11. }
  12.  
  13.  
  14. static int indexFor(int h, int length) {
  15.    return h & (length-1);
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top