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

Side by Side Diff: sdk/lib/core/map.dart

Issue 27308003: Document that concurrent modification is bad, m'kay. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cannot be misread as iterating changing the length. Created 7 years, 2 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/core/list.dart ('k') | sdk/lib/core/set.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * An unordered collection of key-value pairs, from which you retrieve a value 8 * An unordered collection of key-value pairs, from which you retrieve a value
9 * by using its associated key. 9 * by using its associated key.
10 * 10 *
11 * Each key can occur at most once in a map. 11 * Each key can occur at most once in a map.
12 *
13 * It is generally not allowed to modify the map (add or remove keys) while
14 * an operation is being performed on the map, for example in functions called
15 * during a [forEach] or [putIfAbsent] call.
16 * Modifying the map while iterating the keys or values will also most likely
17 * break the iteration.
12 */ 18 */
13 abstract class Map<K, V> { 19 abstract class Map<K, V> {
14 /** 20 /**
15 * Creates a Map instance with the default implementation. 21 * Creates a Map instance with the default implementation.
16 */ 22 */
17 factory Map() = LinkedHashMap<K, V>; 23 factory Map() = LinkedHashMap<K, V>;
18 24
19 /** 25 /**
20 * Creates a Map instance that contains all key-value pairs of [other]. 26 * Creates a Map instance that contains all key-value pairs of [other].
21 */ 27 */
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 /** 175 /**
170 * Returns true if there is no {key, value} pair in the map. 176 * Returns true if there is no {key, value} pair in the map.
171 */ 177 */
172 bool get isEmpty; 178 bool get isEmpty;
173 179
174 /** 180 /**
175 * Returns true if there is at least one {key, value} pair in the map. 181 * Returns true if there is at least one {key, value} pair in the map.
176 */ 182 */
177 bool get isNotEmpty; 183 bool get isNotEmpty;
178 } 184 }
OLDNEW
« no previous file with comments | « sdk/lib/core/list.dart ('k') | sdk/lib/core/set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698