Java Utililty Methods Object to Boolean

List of utility methods to do Object to Boolean

Description

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

Method

booleantoBoolean(Object propValue, boolean defaultValue)
Returns the boolean value of the parameter or the defaultValue if the parameter is null.
propValue = toObject(propValue);
if (propValue instanceof Boolean) {
    return (Boolean) propValue;
} else if (propValue != null) {
    return Boolean.parseBoolean(String.valueOf(propValue));
return defaultValue;