Java Utililty Methods Boolean to String

List of utility methods to do Boolean to String

Description

The list of methods to do Boolean to String are organized into topic(s).

Method

Stringboolean2XML(Boolean b)
Boolean as XML version string.
if (b == null || b.equals(Boolean.FALSE)) {
    return "no";
return "yes";
Stringboolean2XML(Boolean b)
boolean XML
if (b == null || b.equals(Boolean.FALSE)) {
    return "no";
return "yes";
StringbooleanToCheckBox(final boolean value)
Translate the given boolean value into a checkbox string equivalent.
String checkBoxVal = "";
if (value) {
    checkBoxVal = "on";
return checkBoxVal;
StringbooleanToString(boolean a_boolean, String aS_True, String aS_False)
Converts boolean to String
Also null are handled correctly.
if (a_boolean) {
    return aS_True;
} else {
    return aS_False;
StringBooleanToString(boolean aB)
converts boolean to string false - f true - t
if (aB) {
    return "true";
} else {
    return "false";
StringbooleanToString(boolean b)
boolean To String
return (b ? "yes" : "no");
StringbooleanToString(Boolean b)
boolean To String
String content = null;
if (b.booleanValue())
    content = "1";
else
    content = "0";
return content;
StringbooleanToString(boolean value)
Return the Flickr representation of the boolean value.
return value ? "1" : "0";
StringbooleanToSTRING(boolean value)
Convert a boolean to its string representation Equivalent to Boolean.valueOf(boolean).toString().toUpperCase() but valid also for JDK 1.3, which does not have valueOf(boolean)
return value ? "TRUE" : "FALSE";
StringbooleanToString(boolean value)
convert the db value 'y' in the boolean "true"
String bol = "n";
if (value) {
    bol = "y";
return bol;