filterIsInstance<R> method

KtList<R> filterIsInstance<R>()

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

Implementation

KtList<R> filterIsInstance<R>() {
  final destination = mutableListOf<R>();
  for (final element in iter) {
    if (element is R) {
      destination.add(element);
    }
  }
  return destination;
}