Java Boolean to Int BooleanToInteger(boolean thisbool)

Here you can find the source of BooleanToInteger(boolean thisbool)

Description

Boolean To Integer

License

Open Source License

Declaration

public static Integer BooleanToInteger(boolean thisbool) 

Method Source Code

//package com.java2s;
/*//  w w w.ja v a2s .  c o  m
 * B3P Commons Core is a library with commonly used classes for webapps.
 * Included are clieop3, oai, security, struts, taglibs and other
 * general helper classes and extensions.
 *
 * Copyright 2000 - 2008 B3Partners BV
 * 
 * This file is part of B3P Commons Core.
 * 
 * B3P Commons Core is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * B3P Commons Core is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with B3P Commons Core.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    public static Integer BooleanToInteger(boolean thisbool) {
        return thisbool == false ? (new Integer(0)) : (new Integer(1));
    }
}

Related

  1. boolean2int(String tmp)
  2. booleanToInt(boolean[] values)
  3. booleanToint(final boolean value)
  4. booleanToInteger(boolean b)
  5. boolToInt(boolean b)
  6. boolToInt(boolean b)
  7. boolToInt(boolean bool)
  8. BoolToInt(boolean Expression)