List of utility methods to do Boolean From
Boolean | toBoolean(boolean b) to Boolean return b ? Boolean.TRUE : Boolean.FALSE;
|
boolean | toBoolean(Boolean bool) Converts a Boolean to a boolean handling null by returning false . BooleanUtils.toBoolean(Boolean.TRUE) = true BooleanUtils.toBoolean(Boolean.FALSE) = false BooleanUtils.toBoolean(null) = false return bool != null && bool.booleanValue();
|
boolean | toBoolean(Boolean bool) to Boolean if (bool == null) { return false; return bool; |
Boolean | toBoolean(boolean bool) Converts a boolean value into Boolean. if (bool) { return Boolean.TRUE; } else { return Boolean.FALSE; |
boolean | toBoolean(Boolean bool, boolean defaultValue) to Boolean if (bool == null) return defaultValue; return bool; |
String | toBoolean(byte b) See RFC2910, http://www.ietf.org/rfc/rfc2910 IPP boolean is defined as SIGNED-BYTE where 0x00 is 'false' and 0x01 is 'true' return (b == 0) ? "false" : "true"; |
void | toBoolean(byte data[], int offset, boolean value) to Boolean data[offset] = (value ? BOOLEAN_TRUE : BOOLEAN_FALSE); |
Object | toBoolean(byte t_logical) Convert LOGICAL (L) byte to boolean value if (t_logical == 'Y' || t_logical == 'y' || t_logical == 'T' || t_logical == 't') { return Boolean.TRUE; } else if (t_logical == 'N' || t_logical == 'n' || t_logical == 'F' || t_logical == 'f') { return Boolean.FALSE; return null; |
boolean | toBoolean(byte[] b) to Boolean return toBoolean(b, 0);
|
boolean | toBoolean(byte[] byteArray) to Boolean return (byteArray == null || byteArray.length == 0) ? false : byteArray[0] != 0x00;
|