| OLD | NEW |
| 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 11 matching lines...) Expand all Loading... |
| 22 return new HashMap<K, V>()..addAll(other); | 22 return new HashMap<K, V>()..addAll(other); |
| 23 } | 23 } |
| 24 | 24 |
| 25 external int get length; | 25 external int get length; |
| 26 external bool get isEmpty; | 26 external bool get isEmpty; |
| 27 external bool get isNotEmpty; | 27 external bool get isNotEmpty; |
| 28 | 28 |
| 29 external Iterable<K> get keys; | 29 external Iterable<K> get keys; |
| 30 external Iterable<V> get values; | 30 external Iterable<V> get values; |
| 31 | 31 |
| 32 external bool containsKey(K key); | 32 external bool containsKey(Object key); |
| 33 external bool containsValue(V value); | 33 external bool containsValue(Object value); |
| 34 | 34 |
| 35 external void addAll(Map<K, V> other); | 35 external void addAll(Map<K, V> other); |
| 36 | 36 |
| 37 external V operator [](K key); | 37 external V operator [](Object key); |
| 38 external void operator []=(K key, V value); | 38 external void operator []=(K key, V value); |
| 39 | 39 |
| 40 external V putIfAbsent(K key, V ifAbsent()); | 40 external V putIfAbsent(K key, V ifAbsent()); |
| 41 | 41 |
| 42 external V remove(K key); | 42 external V remove(Object key); |
| 43 external void clear(); | 43 external void clear(); |
| 44 | 44 |
| 45 external void forEach(void action(K key, V value)); | 45 external void forEach(void action(K key, V value)); |
| 46 | 46 |
| 47 String toString() => Maps.mapToString(this); | 47 String toString() => Maps.mapToString(this); |
| 48 } | 48 } |
| OLD | NEW |