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

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

Issue 12391046: Add List.asMap(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
Index: sdk/lib/collection/collections.dart
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart
index c5b3d73081b11c56f999e9775bdff9f4aa463cf3..949b69dfa0128442d93ee878aba2df1158da614b 100644
--- a/sdk/lib/collection/collections.dart
+++ b/sdk/lib/collection/collections.dart
@@ -355,6 +355,10 @@ class IterableMixinWorkaround {
if (compare == null) compare = Comparable.compare;
Sort.sort(l, compare);
}
+
+ static Map<int, dynamic> asMapList(List l) {
+ return new ListMapView(l);
+ }
}
class Collections {

Powered by Google App Engine
This is Rietveld 408576698