getAsTypeWithDefault<T> method

T getAsTypeWithDefault <T>(
  1. TypeCode typeCode,
  2. T defaultValue
)

Converts object value into a value defined by specied typecode. If conversion is not possible it returns default value.

  • typeCode the TypeCode that defined the type of the result
  • defaultValue the default value Returns value defined by the typecode or type default value if conversion is not supported.

See TypeConverter.toTypeWithDefault