asNotNullable

inline fun <T, E : T> T.asNotNullable(): E

Casts this object to the specified type E without null safety checks.

Return

The casted object of type E.

Type Parameters

E

The target type to cast to. Must be a subtype of T.

Throws

if the cast is invalid.

Samples