Here you can find the source of booleanToString(boolean a_boolean, String aS_True, String aS_False)
Parameter | Description |
---|---|
a_boolean | boolean which will be converted |
aS_True | String which represents true value |
aS_False | String which represents false value |
public static String booleanToString(boolean a_boolean, String aS_True, String aS_False)
//package com.java2s; /*// w w w . ja v a2 s. c o m NetForm Library --------------- Copyright (C) 2001-2005 - Sampsa Sohlman, Teemu Sohlman This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ public class Main { /** * Converts boolean to String<br> * <i>Also null are handled correctly. All String parameters can have nulls.</i> * @param a_boolean boolean which will be converted * @param aS_True String which represents true value * @param aS_False String which represents false value * @return String corresponding value depeding of a_boolean */ public static String booleanToString(boolean a_boolean, String aS_True, String aS_False) { if (a_boolean) { return aS_True; } else { return aS_False; } } }