Java Utililty Methods Boolean Value From

List of utility methods to do Boolean Value From

Description

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

Method

booleanconvertBoolean(final String value)
convert Boolean
return Boolean.valueOf(value).booleanValue();
booleanconvertBoolean(Object o)
convert Boolean
if (o == null)
    return false;
return Boolean.valueOf(o.toString());
booleanconvertBoolean(String str)
convert Boolean
return convertBoolean(str, false);
booleanconvertBoolean(String str, boolean defaults)
convert Boolean
if (str == null) {
    return defaults;
try {
    return Boolean.parseBoolean(str);
} catch (Exception e) {
    return defaults;
BooleanconvertBoolean(String value)
convert Boolean
if ("true".equalsIgnoreCase(value)) {
    return true;
if ("1".equals(value)) {
    return true;
return false;
BooleanconvertBoolean(String value)
convert Boolean
if (value == null || "".equals(value.trim())) {
    return null;
} else if ("true".equalsIgnoreCase(value)) {
    return true;
} else if ("false".equalsIgnoreCase(value)) {
    return false;
} else if ("yes".equalsIgnoreCase(value)) {
    return true;
...
boolean[]convertBoolean2boolean(final Boolean[] pArray)
convert Booleanboolean
final boolean[] lNewArray = new boolean[pArray.length];
for (int i = 0; i < pArray.length; i++) {
    lNewArray[i] = pArray[i].booleanValue();
return lNewArray;
booleanconvertBooleanFromBytes(byte[] byteArray)
convert Boolean From Bytes
return convertBooleanFromBytes(byteArray, 0);
intconvertBooleanValueToInt(String value)
convert Boolean Value To Int
int val = 0;
if (value.equals("true")) {
    val = 1;
} else {
    val = 0;
return val;