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

Unified Diff: sdk/lib/convert/converter.dart

Issue 1827803002: Make convert library strong-mode compliant. Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix more converters. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/convert/chunked_conversion.dart ('k') | sdk/lib/convert/encoding.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/converter.dart
diff --git a/sdk/lib/convert/converter.dart b/sdk/lib/convert/converter.dart
index 627e4173559a13175b8edbf7c7c2e0a2f02d635d..76ef59809405ffe57f9471a5413f3a838b3b44c0 100644
--- a/sdk/lib/convert/converter.dart
+++ b/sdk/lib/convert/converter.dart
@@ -10,7 +10,7 @@ part of dart.convert;
* It is recommended that implementations of `Converter` extend this class,
* to inherit any further methods that may be added to the class.
*/
-abstract class Converter<S, T> implements StreamTransformer {
+abstract class Converter<S, T> {
const Converter();
/**
@@ -27,21 +27,6 @@ abstract class Converter<S, T> implements StreamTransformer {
Converter<S, dynamic> fuse(Converter<T, dynamic> other) {
return new _FusedConverter<S, T, dynamic>(this, other);
}
-
- /**
- * Starts a chunked conversion.
- */
- ChunkedConversionSink startChunkedConversion(Sink sink) {
- throw new UnsupportedError(
- "This converter does not support chunked conversions: $this");
- }
-
- // Subclasses are encouraged to provide better types.
- Stream bind(Stream stream) {
- return new Stream.eventTransformed(
- stream,
- (EventSink sink) => new _ConverterStreamEventSink(this, sink));
- }
}
/**
@@ -50,14 +35,10 @@ abstract class Converter<S, T> implements StreamTransformer {
* For a non-chunked conversion converts the input in sequence.
*/
class _FusedConverter<S, M, T> extends Converter<S, T> {
- final Converter _first;
- final Converter _second;
+ final Converter<S, M> _first;
+ final Converter<M, T> _second;
_FusedConverter(this._first, this._second);
T convert(S input) => _second.convert(_first.convert(input));
-
- ChunkedConversionSink startChunkedConversion(Sink sink) {
- return _first.startChunkedConversion(_second.startChunkedConversion(sink));
- }
}
« no previous file with comments | « sdk/lib/convert/chunked_conversion.dart ('k') | sdk/lib/convert/encoding.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698