Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created December 13, 2015 04:24
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 codeaholicguy/4a2a7f11bbb738c733e2 to your computer and use it in GitHub Desktop.
Save codeaholicguy/4a2a7f11bbb738c733e2 to your computer and use it in GitHub Desktop.
public V get(Object key) {
Node<K,V> e;
return (e = getNode(hash(key), key)) == null ? null : e.value;
}
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