Here you can find the source of toLong(boolean b)
Parameter | Description |
---|---|
b | The boolean |
public static long toLong(boolean b)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w.j ava 2s . c om * Return the long value of the boolean.<br/> * If boolean is TRUE this will return 1, else 0. * * @param b * The boolean * @return 1, if boolean is TRUE; 0, otherwise */ public static long toLong(boolean b) { if (b) { return 1L; } return 0L; } }