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

Side by Side Diff: sdk/lib/collection/hash_map.dart

Issue 23486007: Change the field and constructor parameter types of NoSuchMethodError to Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/lib/js_mirrors.dart ('k') | sdk/lib/collection/linked_hash_map.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.collection; 5 part of dart.collection;
6 6
7 /** 7 /**
8 * A hash-table based implementation of [Map]. 8 * A hash-table based implementation of [Map].
9 * 9 *
10 * The keys of a `HashMap` must have consistent [Object.operator==] 10 * The keys of a `HashMap` must have consistent [Object.operator==]
(...skipping 20 matching lines...) Expand all
31 * 31 *
32 * For each element of the [iterable] this constructor computes a key/value 32 * For each element of the [iterable] this constructor computes a key/value
33 * pair, by applying [key] and [value] respectively. 33 * pair, by applying [key] and [value] respectively.
34 * 34 *
35 * The keys of the key/value pairs do not need to be unique. The last 35 * The keys of the key/value pairs do not need to be unique. The last
36 * occurrence of a key will simply overwrite any previous value. 36 * occurrence of a key will simply overwrite any previous value.
37 * 37 *
38 * If no values are specified for [key] and [value] the default is the 38 * If no values are specified for [key] and [value] the default is the
39 * identity function. 39 * identity function.
40 */ 40 */
41 factory HashMap.fromIterable(Iterable<K> iterable, 41 factory HashMap.fromIterable(Iterable iterable,
42 {K key(element), V value(element)}) { 42 {K key(element), V value(element)}) {
43 HashMap<K, V> map = new HashMap<K, V>(); 43 HashMap<K, V> map = new HashMap<K, V>();
44 Maps._fillMapWithMappedIterable(map, iterable, key, value); 44 Maps._fillMapWithMappedIterable(map, iterable, key, value);
45 return map; 45 return map;
46 } 46 }
47 47
48 /** 48 /**
49 * Creates a [HashMap] associating the given [keys] to [values]. 49 * Creates a [HashMap] associating the given [keys] to [values].
50 * 50 *
51 * This constructor iterates over [keys] and [values] and maps each element of 51 * This constructor iterates over [keys] and [values] and maps each element of
(...skipping 27 matching lines...) Expand all
79 79
80 external V putIfAbsent(K key, V ifAbsent()); 80 external V putIfAbsent(K key, V ifAbsent());
81 81
82 external V remove(Object key); 82 external V remove(Object key);
83 external void clear(); 83 external void clear();
84 84
85 external void forEach(void action(K key, V value)); 85 external void forEach(void action(K key, V value));
86 86
87 String toString() => Maps.mapToString(this); 87 String toString() => Maps.mapToString(this);
88 } 88 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/js_mirrors.dart ('k') | sdk/lib/collection/linked_hash_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698