Java Utililty Methods Boolean From

List of utility methods to do Boolean From

Description

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

Method

booleantoBoolean(String value)
to Boolean
return toBoolean(value, false);
booleantoBoolean(String value)
to Boolean
return toBoolean(value, false);
BooleantoBoolean(String value)
Converts the specified value string to the Boolean value.
if (value == null || value.equals("")) {
    return false;
if (value.equalsIgnoreCase("true")) {
    return true;
if (value.equalsIgnoreCase("false")) {
    return false;
...
BooleantoBoolean(String value)
to Boolean
return toBoolean(value, Boolean.FALSE);
booleantoBoolean(String value)
to Boolean
if (value.equalsIgnoreCase("true")) {
    return true;
return false;
ObjecttoBoolean(String value)
Returns the Boolean represented by the given string, or null if not a boolean value.
return "true".equalsIgnoreCase(value) ? Boolean.TRUE :
        "false".equalsIgnoreCase(value) ? Boolean.FALSE :
                null;
BooleantoBoolean(String value)
to Boolean
if (null == value) {
    return null;
String str = value.trim();
if ("null".equals(str)) {
    return null;
if ("1".equals(str)) {
...
booleantoBoolean(String value, boolean _default)
to Boolean
if (value == null || value.length() == 0)
    return _default;
return Boolean.valueOf(value);
booleantoBoolean(String value, boolean dEfault)
If value is "true", then true is returned.
if (value == null) {
    return dEfault;
String trimmedVal = value.trim();
if ("true".equalsIgnoreCase(trimmedVal)) {
    return true;
if ("false".equalsIgnoreCase(trimmedVal)) {
...
booleantoBoolean(String value, boolean defaultValue)
Determines whether the boolean value of the given string value.
return "true".equals(value) ? true : ("false".equals(value) ? false : defaultValue);