Conversion

trait Conversion

convert a source to target type.

Since

3.2.0

class Object
trait Matchable
class Any

Value members

Abstract methods

def convert[T](source: Any, targetType: Class[T]): T

Convert to target type.

Convert to target type.

  • convert null to null;

  • convert array to array ,when cannot find converter return targetType[0]