Castable

interface Castable<T : Castable<T>>

A type for all object which can be down-casted via explicit methods

Functions

as
Link copied to clipboard
common
open fun <U : T> as(): U?
Casts the current object to U, if possible, or returns null otherwise
castTo
Link copied to clipboard
common
open fun <U : T> castTo(): U
Down-casts the current object to U, if possible