Converts the specified object to Boolean type according to the following:
obj
is already a Boolean object
(i.e. an instance of java.lang.Boolean
),
the function works simply as a type cast operator,
same as it would be in Java: (Boolean) obj
obj
is a Number object
(an instance of java.lang.Number
),
the function returns true
when the number value != 0
,
and false
otherwise.
obj
is not null
and obj.toString().toLowerCase()
returns "true"
, "yes"
or "on"
,
then the function returns true
.
false
You may call this function in a more method-like style:
obj.toBoolean()