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

Unified Diff: samples/webcomponents/list_map.dart

Issue 10964030: A variety of cleanups to bring our samples up-to-date. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « samples/webcomponents/contactifier/contactifier.html ('k') | samples/webcomponents/shadow_polyfill.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/webcomponents/list_map.dart
===================================================================
--- samples/webcomponents/list_map.dart (revision 12654)
+++ samples/webcomponents/list_map.dart (working copy)
@@ -1,34 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * ListMap class so that we have a dictionary usable with non-hashable keys.
- * Note: this class does NOT yet have full Map functionality
- */
-class ListMap<K, V> {
-
- List<_Pair<K, V>> _list;
-
- ListMap()
- : _list = new List<_Pair<K, V>>() { }
-
- void operator []=(K key, V value) {
- _list.add(new _Pair<K,V>(key, value));
- }
-
- V operator [](K key) {
- for (var pair in _list) {
- if (pair._key == key)
- return pair._value;
- }
- return null;
- }
-}
-
-class _Pair<K, V> {
- K _key;
- V _value;
-
- _Pair(this._key, this._value);
-}
« no previous file with comments | « samples/webcomponents/contactifier/contactifier.html ('k') | samples/webcomponents/shadow_polyfill.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698