Here you can find the source of convertBooleanToInteger(Boolean booleanToConvert)
Parameter | Description |
---|---|
booleanToConvert | the boolean value to convert |
public static Integer convertBooleanToInteger(Boolean booleanToConvert)
//package com.java2s; //License from project: Apache License public class Main { /**/*from ww w.j a v a2 s . co m*/ * Converts a boolean value to the corresponding integer value, 0 for false * and 1 for true. * * @param booleanToConvert the boolean value to convert * @return 0 for false and 1 for true */ public static Integer convertBooleanToInteger(Boolean booleanToConvert) { return booleanToConvert ? 1 : 0; } }