Here you can find the source of hashCode(boolean bool)
public static int hashCode(boolean bool)
//package com.java2s; //License from project: Apache License public class Main { public static int hashCode(boolean bool) { return (bool ? 1231 : 1237); }/* w w w . ja va 2 s . co m*/ public static int hashCode(double dbl) { return hashCode(Double.doubleToLongBits(dbl)); } public static int hashCode(float flt) { return Float.floatToIntBits(flt); } public static int hashCode(long lng) { return (int) (lng ^ (lng >>> 32)); } }