List of utility methods to do Boolean Value From
boolean | convertBoolean(final String value) convert Boolean return Boolean.valueOf(value).booleanValue();
|
boolean | convertBoolean(Object o) convert Boolean if (o == null) return false; return Boolean.valueOf(o.toString()); |
boolean | convertBoolean(String str) convert Boolean return convertBoolean(str, false);
|
boolean | convertBoolean(String str, boolean defaults) convert Boolean if (str == null) { return defaults; try { return Boolean.parseBoolean(str); } catch (Exception e) { return defaults; |
Boolean | convertBoolean(String value) convert Boolean if ("true".equalsIgnoreCase(value)) { return true; if ("1".equals(value)) { return true; return false; |
Boolean | convertBoolean(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; |
boolean | convertBooleanFromBytes(byte[] byteArray) convert Boolean From Bytes return convertBooleanFromBytes(byteArray, 0);
|
int | convertBooleanValueToInt(String value) convert Boolean Value To Int int val = 0; if (value.equals("true")) { val = 1; } else { val = 0; return val; |