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 /** | 5 /** |
6 * This contains extra functions and classes useful for implementing | 6 * This contains extra functions and classes useful for implementing |
7 * serialiation. Some or all of these will be removed once the functionality is | 7 * serialiation. Some or all of these will be removed once the functionality is |
8 * available in the core library. | 8 * available in the core library. |
9 */ | 9 */ |
10 library serialization_helpers; | 10 library serialization_helpers; |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 keys.removeAt(index); | 241 keys.removeAt(index); |
242 return values.removeAt(index); | 242 return values.removeAt(index); |
243 } | 243 } |
244 | 244 |
245 int get length => keys.length; | 245 int get length => keys.length; |
246 void clear() { | 246 void clear() { |
247 keys.clear(); | 247 keys.clear(); |
248 values.clear(); | 248 values.clear(); |
249 } | 249 } |
250 bool get isEmpty => keys.isEmpty; | 250 bool get isEmpty => keys.isEmpty; |
| 251 bool get isNotEmpty => !isEmpty; |
251 | 252 |
252 // Note that this is doing an equality comparison. | 253 // Note that this is doing an equality comparison. |
253 bool containsValue(x) => values.contains(x); | 254 bool containsValue(x) => values.contains(x); |
254 } | 255 } |
OLD | NEW |