Here you can find the source of toInt(final Boolean value)
Parameter | Description |
---|---|
value | the value |
public static int toInt(final Boolean value)
//package com.java2s; //License from project: Open Source License public class Main { /** The Constant FALSE_INT. */ public static final int FALSE_INT = 0; /** The Constant TRUE_INT. */ public static final int TRUE_INT = 1; /**//from w w w .ja va 2 s. co m * To int. * * @param value * the value * @return the int */ public static int toInt(final Boolean value) { if (value == null) { return FALSE_INT; } return toInt(value.booleanValue()); } /** * To int. * * @param value * the value * @return the int */ public static int toInt(final boolean value) { if (value) { return TRUE_INT; } return FALSE_INT; } }