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 | 4 |
5 part of dart._collection.dev; | 5 part of dart._internal; |
6 | 6 |
7 /** | 7 /** |
8 * Marker interface for [Iterable] subclasses that have an efficient | 8 * Marker interface for [Iterable] subclasses that have an efficient |
9 * [length] implementation. | 9 * [length] implementation. |
10 */ | 10 */ |
11 abstract class EfficientLength { | 11 abstract class EfficientLength { |
12 /** | 12 /** |
13 * Returns the number of elements in the iterable. | 13 * Returns the number of elements in the iterable. |
14 * | 14 * |
15 * This is an efficient operation that doesn't require iterating through | 15 * This is an efficient operation that doesn't require iterating through |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 | 1158 |
1159 static Set setDifference(Set set, Set other, Set result) { | 1159 static Set setDifference(Set set, Set other, Set result) { |
1160 for (var element in set) { | 1160 for (var element in set) { |
1161 if (!other.contains(element)) { | 1161 if (!other.contains(element)) { |
1162 result.add(element); | 1162 result.add(element); |
1163 } | 1163 } |
1164 } | 1164 } |
1165 return result; | 1165 return result; |
1166 } | 1166 } |
1167 } | 1167 } |
OLD | NEW |