toPrimitiveBoolean()

Converts a String or Boolean object to the primitive boolean data type.

Syntax

boolean toPrimitiveBoolean(Object objectData)

Parameters

objectData
A String or Boolean object that you want to convert to the primitive boolean data type.

Return values

Returns a primitive boolean value.

Exceptions

DtpIncompatibleFormatException - If the source data type cannot be converted to boolean.

Notes

This method can only handle String and Boolean objects.

Examples

boolean MyBoolean = DtpDataConversion.toPrimitiveBoolean(MyStringObj);

See also

getType(), isOKToConvert(), toBoolean()

For more information, see the Java Language Specification.

Copyright IBM Corp. 2004, 2005