Here you can find the source of hashCode64(String s)
Parameter | Description |
---|---|
s | a parameter |
public static long hashCode64(String s)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w ww.j av a 2 s .c o m*/ * Generate a 64 bit hash code for the specified string * @param s * @return */ public static long hashCode64(String s) { long h = 0; if (s != null && s.length() > 0) { int off = 0; int len = s.length(); for (int i = 0; i < len; i++) { h = 31 * h + s.charAt(off++); } } return h; } }