code: public static int Wang64to32shift(long key) {
          key = (~key) + (key << 18); // key = (key << 18) - key - 1;
          key = key ^ (key >>> 31);
          key = key * 21; // key = (key + (key << 2)) + (key << 4);
          key = key ^ (key >>> 11);
          key = key + (key << 6);
          key = key ^ (key >>> 22);
          return (int) key;
      }
docs: Hashing long to int. <p/> <h3>Links</h3> <a href="http://www.concentric.net/~ttwang/tech/inthash.htm">http://www.concentric.net/~ttwang/tech/inthash.htm</a><br/>
  
  @param key key to be hashed
  @return hashed value