Here you can find the source of hash(int value)
public static int hash(int value)
//package com.java2s; /*/*from ww w . ja v a2s . co m*/ * Copyright (c) 2003, the JUNG Project and the Regents of the University * of California * All rights reserved. * * This software is open-source under the BSD license; see either * "license.txt" or * http://jung.sourceforge.net/license.txt for a description. */ public class Main { private static final int K = 10; private static final int INT_SIZE = 32; private static final int KnuthsAValue = (int) 2654435769L; public static int hash(int value) { return (value * KnuthsAValue) >>> (INT_SIZE - K); } }