public static long hash(String s){
  if (s == null) {
    return 0;
  }
  int h=0;
  int l=0;
  int len=s.length();
  char[] val=s.toCharArray();
  for (int i=0; i < len; i++) {
    h=31 * h + val[i];
    l=29 * l + val[i];
  }
  return ((long)h << 32) | ((long)l & 0x0ffffffffL);
}

public static long hash ( String s ) { if ( s == null ) { return 0 ; } int h = 0 ; int l = 0 ; int len = s . length ( ) ; char [ ] val = s . toCharArray ( ) ; for ( int i = 0 ; i < len ; i ++ ) { h = 31 * h + val [ i ] ; l = 29 * l + val [ i ] ; } return ( ( long ) h << 32 ) | ( ( long ) l & 0x0ffffffffL ) ; }
hash ( 64bits ) of string .
