int hash(Object k){
  int h;
  h=k.hashCode();
  h^=(h >>> 20) ^ (h >>> 12);
  return h ^ (h >>> 7) ^ (h >>> 4);
}

int hash ( Object k ) { int h ; h = k . hashCode ( ) ; h ^= ( h > > > 20 ) ^ ( h > > > 12 ) ; return h ^ ( h > > > 7 ) ^ ( h > > > 4 ) ; }
retrieve object hash code and applies a supplemental hash function to the result hash , which defends against poor quality hash functions . this is critical because hashmap uses power - of - two length hash tables , that otherwise encounter collisions for hashcodes that do not differ in lower bits .
