Here you can find the source of hash(Boolean value)
public static int hash(Boolean value)
//package com.java2s; //License from project: Open Source License public class Main { public static int hash(Boolean value) { return value ? 1231 : 1237; }//from w w w. jav a 2 s . co m public static int hash(Integer value) { return value.intValue(); } public static int hash(Long value) { return (int) (value ^ (value >>> 32)); } public static int hash(Float value) { return Float.floatToIntBits(value); } public static int hash(Double value) { long bits = Double.doubleToLongBits(value); return hash(bits); } }