Spec-Zone.ru › Dart 2

dart:collection

метод followedBy

Iterable<E> followedBy(
  1. Iterable<E> other
)
переопределение

Возвращает ленивую конкатенацию этой последовательности и other.

Возвращённая последовательность будет содержать те же элементы, что и эта последовательность, а затем элементы other в том же порядке, что и в исходных последовательностях.

Пример:

var planets = <String>['Earth', 'Jupiter'];
var updated = planets.followedBy(['Mars', 'Venus']);
print(updated); // (Earth, Jupiter, Mars, Venus)

Реализация

Iterable<E> followedBy(Iterable<E> other) {
  // Type workaround because IterableMixin<E> doesn't promote
  // to EfficientLengthIterable<E>.
  Iterable<E> self = this;
  if (self is EfficientLengthIterable<E>) {
    return FollowedByIterable<E>.firstEfficient(self, other);
  }
  return FollowedByIterable<E>(this, other);
}

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

Spec-Zone.ru

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