| 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 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 6 | 6 |
| 7 // TODO(nweiz): update this when maps support lazy iteration | 7 // TODO(nweiz): update this when maps support lazy iteration |
| 8 bool containsValue(String value) => getValues().some((e) => e == value); | 8 bool containsValue(String value) => getValues().some((e) => e == value); |
| 9 | 9 |
| 10 bool containsKey(String key) => $dom_getItem(key) != null; | 10 bool containsKey(String key) => $dom_getItem(key) != null; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 forEach((k, v) => keys.add(k)); | 40 forEach((k, v) => keys.add(k)); |
| 41 return keys; | 41 return keys; |
| 42 } | 42 } |
| 43 | 43 |
| 44 Collection<String> getValues() { | 44 Collection<String> getValues() { |
| 45 final values = []; | 45 final values = []; |
| 46 forEach((k, v) => values.add(v)); | 46 forEach((k, v) => values.add(v)); |
| 47 return values; | 47 return values; |
| 48 } | 48 } |
| 49 | 49 |
| 50 int get length => $dom_length; | 50 int get length() => $dom_length; |
| 51 | 51 |
| 52 bool isEmpty() => $dom_key(0) == null; | 52 bool isEmpty() => $dom_key(0) == null; |
| 53 $!MEMBERS | 53 $!MEMBERS |
| 54 } | 54 } |
| OLD | NEW |