tryCast

fun <T, V> T.tryCast(action: (V) -> V): T

Try to cast object to another type

Return

Return current object

Parameters

action

Target action to execute if object was changed