Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public V put(K key, V value) {
- int hash = hash(key.hashCode());
- int i = indexFor(hash, table.length);
- .....
- }
- static int hash(int h) {
- h ^= (h >>> 20) ^ (h >>> 12);
- return h ^ (h >>> 7) ^ (h >>> 4);
- }
- static int indexFor(int h, int length) {
- return h & (length-1);
- }
Add Comment
Please, Sign In to add comment