public class BooleanUtils
extends org.apache.commons.lang3.BooleanUtils
Constructor and Description |
---|
BooleanUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
toBoolean(Object obj)
Converts an object to boolean, according to the following logic:
If it's null,
false is returned.
If it's a Boolean, the same object is returned.
If it's any other object, the toString() value is converted to boolean.
|
and, and, compare, isFalse, isNotFalse, isNotTrue, isTrue, negate, or, or, toBoolean, toBoolean, toBoolean, toBoolean, toBoolean, toBoolean, toBooleanDefaultIfNull, toBooleanObject, toBooleanObject, toBooleanObject, toBooleanObject, toBooleanObject, toBooleanObject, toInteger, toInteger, toInteger, toIntegerObject, toIntegerObject, toIntegerObject, toIntegerObject, toString, toString, toStringOnOff, toStringOnOff, toStringTrueFalse, toStringTrueFalse, toStringYesNo, toStringYesNo, xor, xor
public static boolean toBoolean(Object obj)
false
is returned.toString()
value is converted to boolean.obj
- Copyright © 2023. All rights reserved.