Value.toBoolean

Overview | Methods | This Package | All Packages

Value.toBoolean

Converts an object to a boolean value.

Syntax

public static boolean toBoolean( Object value )

Parameters

value

The value to convert.

Return Value

Returns a boolean value that represents the object.

Exceptions

ClassCastException thrown if the argument cannot be converted.

Remarks

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