Here you can find the source of hash(int h, Object o)
public static int hash(int h, Object o)
//package com.java2s; /*/*from w ww . j a v a 2 s . co m*/ * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ public class Main { /** * Combines two integers into a hash code. */ public static int hash(int i, int j) { return (i << 4) ^ j; } /** * Computes a hash code from an existing hash code and an object (which may * be null). */ public static int hash(int h, Object o) { int k = (o == null) ? 0 : o.hashCode(); return ((h << 4) | h) ^ k; } /** Computes the hash code of a {@code double} value. Equivalent to * {@link Double}{@code .hashCode(double)}, but that method was only * introduced in JDK 1.8. * * @param v Value * @return Hash code */ public static int hashCode(double v) { long bits = Double.doubleToLongBits(v); return (int) (bits ^ (bits >>> 32)); } }