W3cubDocs

/Dart 2

whereType<T> method

Iterable<T> whereType <T>()

Returns a new lazy Iterable with all elements that have type T.

The matching elements have the same order in the returned iterable as they have in iterator.

This method returns a view of the mapped elements. Iterating will not cache results, and thus iterating multiple times over the returned Iterable may yield different results, if the underlying elements change between iterations.

Implementation

Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-collection/IterableMixin/whereType.html