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

Unified Diff: sdk/lib/collection/collections.dart

Issue 12090093: Reapply "Rename mappedBy to map." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug in previous commit. Created 7 years, 11 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/async/stream.dart ('k') | sdk/lib/collection/maps.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/collections.dart
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart
index f9e83eed8318f1e96d11b4265bf21b888b88a9e6..0c45e21d4250f85f4e04110279d4fb89403f8e76 100644
--- a/sdk/lib/collection/collections.dart
+++ b/sdk/lib/collection/collections.dart
@@ -313,12 +313,18 @@ class IterableMixinWorkaround {
return new WhereIterable(iterable, f);
}
+ static Iterable map(Iterable iterable, f(var element)) {
+ return new MappedIterable(iterable, f);
+ }
+
static List mappedByList(List list, f(var element)) {
+ // This is currently a List as well as an Iterable.
return new MappedList(list, f);
}
- static List takeList(List list, int n) {
+ static Iterable takeList(List list, int n) {
// The generic type is currently lost. It will be fixed with mixins.
+ // This is currently a List as well as an Iterable.
return new ListView(list, 0, n);
}
@@ -327,8 +333,9 @@ class IterableMixinWorkaround {
return new TakeWhileIterable(iterable, test);
}
- static List skipList(List list, int n) {
+ static Iterable skipList(List list, int n) {
// The generic type is currently lost. It will be fixed with mixins.
+ // This is currently a List as well as an Iterable.
return new ListView(list, n, null);
}
@@ -443,7 +450,7 @@ class Collections {
=> IterableMixinWorkaround.mappedByList(list, f);
/** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/
- static List takeList(List list, int n)
+ static Iterable takeList(List list, int n)
=> IterableMixinWorkaround.takeList(list, n);
/** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/
@@ -451,7 +458,7 @@ class Collections {
=> IterableMixinWorkaround.takeWhile(iterable, test);
/** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/
- static List skipList(List list, int n)
+ static Iterable skipList(List list, int n)
=> IterableMixinWorkaround.skipList(list, n);
/** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | sdk/lib/collection/maps.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698