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

Unified Diff: sdk/lib/html/html_common/filtered_element_list.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/html/html_common/filtered_element_list.dart
diff --git a/sdk/lib/html/html_common/filtered_element_list.dart b/sdk/lib/html/html_common/filtered_element_list.dart
index 2883cf76d9535885057eb8b0cee03959315b171b..b1f9a7f2ea0aeaa4da169536862ee1bd80f636ff 100644
--- a/sdk/lib/html/html_common/filtered_element_list.dart
+++ b/sdk/lib/html/html_common/filtered_element_list.dart
@@ -205,4 +205,8 @@ class FilteredElementList implements List {
Element min([int compare(Element a, Element b)]) => _filtered.min(compare);
Element max([int compare(Element a, Element b)]) => _filtered.max(compare);
+
+ Map<int, Element> asMap() {
+ return IterableMixinWorkaround.asMapList(this);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698