Determines the data type of a value.
Syntax
int getType(Object objectData) int getType(int integerData) int getType(float floatData) int getType(double doubleData) int getType(boolean booleanData)
Parameters
Return values
Returns an integer representing the data type of the parameter you pass. You can interpret the return value by comparing it to one of these constants which are declared as static and final in the DtpDataConversion class:
Exceptions
None.
Notes
You can use the return values from getType() in the OKToConvert() method to determine whether a conversion is possible between two given data types.
Examples
int conversionStatus = DtpDataConversion.isOKToConvert( DtpDataConversion.getType(srcObject), DtpDataConversion.getType(destObject)); switch(conversionStatus) { case DtpDataConversion.OKTOCONVERT: // go ahead and convert break; case DtpDataConversion.POTENTIALDATALOSS: // convert, then check value break; case DtpDataConversion.CANNOTCONVERT: // return an error break; }
See also