Skip to content

Instantly share code, notes, and snippets.

@LeoHeo
Created June 10, 2018 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeoHeo/88e42e2b1cc04a317e552ab887ad8ff9 to your computer and use it in GitHub Desktop.
Save LeoHeo/88e42e2b1cc04a317e552ab887ad8ff9 to your computer and use it in GitHub Desktop.
public V put(K key, V value) {
return putVal(hash(key), key, value, false, true);
}
static final int hash(Object key) {
int h;
return (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment