Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Side by Side Diff: tool/input_sdk/lib/async/stream.dart

Issue 1808393002: SDK fixes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/convert.js ('k') | tool/input_sdk/lib/internal/iterable.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.async; 5 part of dart.async;
6 6
7 // ------------------------------------------------------------------- 7 // -------------------------------------------------------------------
8 // Core Stream types 8 // Core Stream types
9 // ------------------------------------------------------------------- 9 // -------------------------------------------------------------------
10 10
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 476
477 /** 477 /**
478 * Chains this stream as the input of the provided [StreamTransformer]. 478 * Chains this stream as the input of the provided [StreamTransformer].
479 * 479 *
480 * Returns the result of [:streamTransformer.bind:] itself. 480 * Returns the result of [:streamTransformer.bind:] itself.
481 * 481 *
482 * The `streamTransformer` can decide whether it wants to return a 482 * The `streamTransformer` can decide whether it wants to return a
483 * broadcast stream or not. 483 * broadcast stream or not.
484 */ 484 */
485 Stream transform(StreamTransformer<T, dynamic> streamTransformer) { 485 Stream/*<S>*/ transform/*<S>*/(
486 StreamTransformer<T, dynamic/*=S*/ > streamTransformer) {
486 return streamTransformer.bind(this); 487 return streamTransformer.bind(this);
487 } 488 }
488 489
489 /** 490 /**
490 * Reduces a sequence of values by repeatedly applying [combine]. 491 * Reduces a sequence of values by repeatedly applying [combine].
491 */ 492 */
492 Future<T> reduce(T combine(T previous, T element)) { 493 Future<T> reduce(T combine(T previous, T element)) {
493 _Future<T> result = new _Future<T>(); 494 _Future<T> result = new _Future<T>();
494 bool seenFirst = false; 495 bool seenFirst = false;
495 T value; 496 T value;
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 class _ControllerEventSinkWrapper<T> implements EventSink<T> { 1662 class _ControllerEventSinkWrapper<T> implements EventSink<T> {
1662 EventSink _sink; 1663 EventSink _sink;
1663 _ControllerEventSinkWrapper(this._sink); 1664 _ControllerEventSinkWrapper(this._sink);
1664 1665
1665 void add(T data) { _sink.add(data); } 1666 void add(T data) { _sink.add(data); }
1666 void addError(error, [StackTrace stackTrace]) { 1667 void addError(error, [StackTrace stackTrace]) {
1667 _sink.addError(error, stackTrace); 1668 _sink.addError(error, stackTrace);
1668 } 1669 }
1669 void close() { _sink.close(); } 1670 void close() { _sink.close(); }
1670 } 1671 }
OLDNEW
« no previous file with comments | « lib/runtime/dart/convert.js ('k') | tool/input_sdk/lib/internal/iterable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698