filterIsInstance

Common
JVM
JS
Native
1.0
fun <reified R> Array<*>.filterIsInstance(): List<R>
fun <reified R> Iterable<*>.filterIsInstance(): List<R>

Returns a list containing all elements that are instances of specified type parameter R.

JVM
1.0
fun <R> Array<*>.filterIsInstance(klass: Class<R>): List<R>
fun <R> Iterable<*>.filterIsInstance(
    klass: Class<R>
): List<R>

Returns a list containing all elements that are instances of specified class.