Here you can find the source of hashCode1(String str)
public static long hashCode1(String str)
//package com.java2s; //License from project: Apache License public class Main { public static long hashCode1(String str) { long hash = 0; long x = 0; for (int i = 0; i < str.length(); i++) { hash = (hash << 4) + str.charAt(i); if ((x = hash & 0xF0000000L) != 0) { hash ^= (x >> 24); hash &= ~x;/* w w w.j av a2 s . c o m*/ } } return (hash & 0x7FFFFFFF); } }