Java Boolean to String booleanToCheckBox(final boolean value)

Here you can find the source of booleanToCheckBox(final boolean value)

Description

Translate the given boolean value into a checkbox string equivalent.

License

BSD License

Parameter

Parameter Description
value A boolean value

Return

Checkbox string equivalent

Declaration

public static String booleanToCheckBox(final boolean value) 

Method Source Code

//package com.java2s;
/*L//  ww  w.jav  a2 s. c  om
 *  Copyright RTI International
 *
 *  Distributed under the OSI-approved BSD 3-Clause License.
 *  See http://ncip.github.com/webgenome/LICENSE.txt for details.
 */

public class Main {
    /**
     * Translate the given boolean value into a checkbox
     * string equivalent.
     * @param value A boolean value
     * @return Checkbox string equivalent
     */
    public static String booleanToCheckBox(final boolean value) {
        String checkBoxVal = "";
        if (value) {
            checkBoxVal = "on";
        }
        return checkBoxVal;
    }
}

Related

  1. boolean2XML(Boolean b)
  2. boolean2XML(Boolean b)
  3. booleanToString(boolean a_boolean, String aS_True, String aS_False)
  4. BooleanToString(boolean aB)
  5. booleanToString(boolean b)
  6. booleanToString(Boolean b)