| 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 // Immutable map class for compiler generated map literals. | 4 // Immutable map class for compiler generated map literals. |
| 5 | 5 |
| 6 class ImmutableMap<K, V> implements Map<K, V> { | 6 class ImmutableMap<K, V> implements Map<K, V> { |
| 7 final ImmutableArray kvPairs_; | 7 final ImmutableArray kvPairs_; |
| 8 | 8 |
| 9 const ImmutableMap._create(ImmutableArray keyValuePairs) | 9 const ImmutableMap._create(ImmutableArray keyValuePairs) |
| 10 : kvPairs_ = keyValuePairs; | 10 : kvPairs_ = keyValuePairs; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 void clear() { | 82 void clear() { |
| 83 throw const IllegalAccessException(); | 83 throw const IllegalAccessException(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 V remove(K key) { | 86 V remove(K key) { |
| 87 throw const IllegalAccessException(); | 87 throw const IllegalAccessException(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 String toString() { | 90 String toString() { |
| 91 // TODO(srdjan): Extend text representation. | 91 return Maps.mapToString(this); |
| 92 return "ImmutableMap"; | |
| 93 } | 92 } |
| 94 } | 93 } |
| 95 | 94 |
| OLD | NEW |