Here you can find the source of hash(Object[] array)
public static int hash(Object[] array)
//package com.java2s; /*/*from w ww . ja va 2s. c o m*/ * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ public class Main { private static int SEED = 23; private static int PRIME_NUMER = 37; /** * calculate the array hash (only the first level) */ public static int hash(Object[] array) { int length = array.length; int seed = SEED; for (Object anArray : array) { seed = hash(seed, anArray == null ? 0 : anArray.hashCode()); } return seed; } /** * calculate the array hash (only the first level) */ public static int hash(char[] array) { int length = array.length; int seed = SEED; for (char anArray : array) { seed = hash(seed, anArray); } return seed; } /** * calculate the array hash (only the first level) */ public static int hash(byte[] bytes) { int length = bytes.length; int seed = SEED; for (byte aByte : bytes) { seed = hash(seed, aByte); } return seed; } private static int hash(int seed, int i) { return PRIME_NUMER * seed + i; } }