Here you can find the source of hash(int h)
public static final int hash(int h)
//package com.java2s; public class Main { public static final int hash(int h) { h ^= (h >>> 20) ^ (h >>> 12); return h ^ (h >>> 7) ^ (h >>> 4); }/*from ww w . j ava 2s. co m*/ public static final int hash(long l) { return hash((int) (l ^ (l >>> 32))); } public static final int hash(final Object o) { if (o == null) { return 0; } return hash(o.hashCode()); } }