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

Side by Side Diff: sdk/lib/async/stream.dart

Issue 1220233004: Fix comparison of StreamIterator with Iterable - should be Iterator. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | 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 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 * When this stream is listened to, it will start listening on [stream], 1657 * When this stream is listened to, it will start listening on [stream],
1658 * and generate events on the new stream based on the events from [stream]. 1658 * and generate events on the new stream based on the events from [stream].
1659 * 1659 *
1660 * Subscriptions on the returned stream should propagate pause state 1660 * Subscriptions on the returned stream should propagate pause state
1661 * to the subscription on [stream]. 1661 * to the subscription on [stream].
1662 */ 1662 */
1663 Stream<T> bind(Stream<S> stream); 1663 Stream<T> bind(Stream<S> stream);
1664 } 1664 }
1665 1665
1666 /** 1666 /**
1667 * An [Iterable] like interface for the values of a [Stream]. 1667 * An [Iterator] like interface for the values of a [Stream].
1668 * 1668 *
1669 * This wraps a [Stream] and a subscription on the stream. It listens 1669 * This wraps a [Stream] and a subscription on the stream. It listens
1670 * on the stream, and completes the future returned by [moveNext] when the 1670 * on the stream, and completes the future returned by [moveNext] when the
1671 * next value becomes available. 1671 * next value becomes available.
1672 */ 1672 */
1673 abstract class StreamIterator<T> { 1673 abstract class StreamIterator<T> {
1674 1674
1675 /** Create a [StreamIterator] on [stream]. */ 1675 /** Create a [StreamIterator] on [stream]. */
1676 factory StreamIterator(Stream<T> stream) = _StreamIteratorImpl<T>; 1676 factory StreamIterator(Stream<T> stream) = _StreamIteratorImpl<T>;
1677 1677
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 class _ControllerEventSinkWrapper<T> implements EventSink<T> { 1732 class _ControllerEventSinkWrapper<T> implements EventSink<T> {
1733 EventSink _sink; 1733 EventSink _sink;
1734 _ControllerEventSinkWrapper(this._sink); 1734 _ControllerEventSinkWrapper(this._sink);
1735 1735
1736 void add(T data) { _sink.add(data); } 1736 void add(T data) { _sink.add(data); }
1737 void addError(error, [StackTrace stackTrace]) { 1737 void addError(error, [StackTrace stackTrace]) {
1738 _sink.addError(error, stackTrace); 1738 _sink.addError(error, stackTrace);
1739 } 1739 }
1740 void close() { _sink.close(); } 1740 void close() { _sink.close(); }
1741 } 1741 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698