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

Unified Diff: tools/dom/src/WrappedList.dart

Issue 12391046: Add List.asMap(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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
« no previous file with comments | « tests/corelib/list_as_map_test.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/WrappedList.dart
diff --git a/tools/dom/src/WrappedList.dart b/tools/dom/src/WrappedList.dart
index 3343db6cbcd6b1ee0fffc06e323b569a784a1767..7b27218793d3e93b5006bc53b4832f66071c9de3 100644
--- a/tools/dom/src/WrappedList.dart
+++ b/tools/dom/src/WrappedList.dart
@@ -124,6 +124,8 @@ class _WrappedList<E> implements List<E> {
void insertRange(int start, int length, [E fill]) {
_list.insertRange(start, length, fill);
}
+
+ Map<int, E> asMap() => IterableMixinWorkaround.asMapList(_list);
}
/**
« no previous file with comments | « tests/corelib/list_as_map_test.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698