Spec-Zone.ru › Dart 2

dart:core

castFrom<S, T> static method

Iterable<T> castFrom<S, T>(
  1. Iterable<S> source
)

Adapts source to be an Iterable<T>.

Any time the iterable would produce an element that is not a T, the element access will throw. If all elements of source are actually instances of T, or if only elements that are actually instances of T are accessed, then the resulting iterable can be used as an Iterable<T>.

Implementation

static Iterable<T> castFrom<S, T>(Iterable<S> source) =>
    CastIterable<S, T>(source);

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-core/Iterable/castFrom.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API