castTo

open fun <U : T> castTo(): U

Down-casts the current object to U, if possible

Return

the current object, casted to U

Throws

if the current object is not an instance of U