Index: lib/src/stream_zip.dart |
diff --git a/lib/stream_zip.dart b/lib/src/stream_zip.dart |
similarity index 83% |
copy from lib/stream_zip.dart |
copy to lib/src/stream_zip.dart |
index 055489dbd38cd5dd6eb9dc7015887ee5a8df1f12..432cc22c29d8aaed15518cd6821f3ca3bf7df788 100644 |
--- a/lib/stream_zip.dart |
+++ b/lib/src/stream_zip.dart |
@@ -1,22 +1,23 @@ |
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-/** |
- * Help for combining multiple streams into a single stream. |
- */ |
-library dart.pkg.async.stream_zip; |
- |
import "dart:async"; |
-/** |
- * A stream that combines the values of other streams. |
- */ |
-class StreamZip extends Stream<List> { |
- final Iterable<Stream> _streams; |
- StreamZip(Iterable<Stream> streams) : _streams = streams; |
+/// A stream that combines the values of other streams. |
+/// |
+/// This emits lists of collected values from each input stream. The first list |
+/// contains the first value emitted by each stream, the second contrains the |
+/// second value, and so on. The lists have the same ordering as the iterable |
+/// passed to [new StreamZip]. |
+/// |
+/// Any errors from any of the streams are forwarded directly to this stream. |
+class StreamZip<T> extends Stream<List<T>> { |
+ final Iterable<Stream<T>> _streams; |
+ |
+ StreamZip(Iterable<Stream<T>> streams) : _streams = streams; |
- StreamSubscription<List> listen(void onData(List data), { |
+ StreamSubscription<List<T>> listen(void onData(List data), { |
Function onError, |
void onDone(), |
bool cancelOnError}) { |