Here you can find the source of booleanToLong(boolean b)
public static long booleanToLong(boolean b)
//package com.java2s; //License from project: LGPL public class Main { public static long booleanToLong(boolean b) { return b ? 1L : 0L; }//from w w w .ja v a2 s . co m }