List of utility methods to do Boolean From
boolean | toBoolean(String value) to Boolean return toBoolean(value, false);
|
boolean | toBoolean(String value) to Boolean return toBoolean(value, false);
|
Boolean | toBoolean(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; ... |
Boolean | toBoolean(String value) to Boolean return toBoolean(value, Boolean.FALSE);
|
boolean | toBoolean(String value) to Boolean if (value.equalsIgnoreCase("true")) { return true; return false; |
Object | toBoolean(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; |
Boolean | toBoolean(String value) to Boolean if (null == value) { return null; String str = value.trim(); if ("null".equals(str)) { return null; if ("1".equals(str)) { ... |
boolean | toBoolean(String value, boolean _default) to Boolean if (value == null || value.length() == 0) return _default; return Boolean.valueOf(value); |
boolean | toBoolean(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)) { ... |
boolean | toBoolean(String value, boolean defaultValue) Determines whether the boolean value of the given string value. return "true".equals(value) ? true : ("false".equals(value) ? false : defaultValue); |