Converts an object to a boolean value.
public static boolean toBoolean( Object value )
value
The value to convert.
Returns a boolean value that represents the object.
ClassCastException thrown if the argument cannot be converted.
The following table lists the supported argument types and the resulting conversion.
Type | Conversion |
null | Returns false. |
Boolean | Returns the boolean value stored in the object. Produced by calling Boolean.booleanValue. |
String | Returns true if the string is "true" (case insensitive); otherwise, returns false. |
Variant | Returns the result of coercing the variant to a boolean value. Produced by calling Variant.Boolean. |
See Also toObject