| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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; | |
| 6 | |
| 7 /* | 5 /* |
| 8 * Helper class which implements complex [Map] operations | 6 * Helper class which implements complex [Map] operations |
| 9 * in term of basic ones ([Map.keys], [Map.operator []], | 7 * in term of basic ones ([Map.keys], [Map.operator []], |
| 10 * [Map.operator []=] and [Map.remove].) Not all methods are | 8 * [Map.operator []=] and [Map.remove].) Not all methods are |
| 11 * necessary to implement each particular operation. | 9 * necessary to implement each particular operation. |
| 12 */ | 10 */ |
| 13 class Maps { | 11 class Maps { |
| 14 static bool containsValue(Map map, value) { | 12 static bool containsValue(Map map, value) { |
| 15 for (final v in map.values) { | 13 for (final v in map.values) { |
| 16 if (value == v) { | 14 if (value == v) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 first = false; | 104 first = false; |
| 107 Collections._emitObject(k, result, visiting); | 105 Collections._emitObject(k, result, visiting); |
| 108 result.add(': '); | 106 result.add(': '); |
| 109 Collections._emitObject(v, result, visiting); | 107 Collections._emitObject(v, result, visiting); |
| 110 }); | 108 }); |
| 111 | 109 |
| 112 result.add('}'); | 110 result.add('}'); |
| 113 visiting.removeLast(); | 111 visiting.removeLast(); |
| 114 } | 112 } |
| 115 } | 113 } |
| OLD | NEW |