List of utility methods to do Object to Boolean
boolean | toBoolean(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; |