| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |