OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 * Wrappers that prevent List, Set, or Map objects from being modified. | 6 * Wrappers that prevent List, Set, or Map objects from being modified. |
7 * | 7 * |
8 * The [Set] and [Map] wrappers allow reading from the wrapped collection, | 8 * The [Set] and [Map] wrappers allow reading from the wrapped collection, |
9 * but prohibit writing. | 9 * but prohibit writing. |
10 * | 10 * |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 bool containsAll(Iterable<E> other) => _source.containsAll(other); | 174 bool containsAll(Iterable<E> other) => _source.containsAll(other); |
175 | 175 |
176 Set<E> intersection(Set<E> other) => _source.intersection(other); | 176 Set<E> intersection(Set<E> other) => _source.intersection(other); |
177 | 177 |
178 Set<E> union(Set<E> other) => _source.union(other); | 178 Set<E> union(Set<E> other) => _source.union(other); |
179 | 179 |
180 Set<E> difference(Set<E> other) => _source.difference(other); | 180 Set<E> difference(Set<E> other) => _source.difference(other); |
181 | 181 |
| 182 E lookup(Object object) => _source.lookup(object); |
182 | 183 |
183 /** | 184 /** |
184 * Throws an [UnsupportedError]; | 185 * Throws an [UnsupportedError]; |
185 * operations that change the set are disallowed. | 186 * operations that change the set are disallowed. |
186 */ | 187 */ |
187 void add(E value) => _throw(); | 188 void add(E value) => _throw(); |
188 | 189 |
189 /** | 190 /** |
190 * Throws an [UnsupportedError]; | 191 * Throws an [UnsupportedError]; |
191 * operations that change the set are disallowed. | 192 * operations that change the set are disallowed. |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 Iterable<E> take(int n) => _source.take(n); | 351 Iterable<E> take(int n) => _source.take(n); |
351 | 352 |
352 Iterable<E> takeWhile(bool test(E value)) => _source.takeWhile(test); | 353 Iterable<E> takeWhile(bool test(E value)) => _source.takeWhile(test); |
353 | 354 |
354 List<E> toList({ bool growable: true }) => _source.toList(growable: growable); | 355 List<E> toList({ bool growable: true }) => _source.toList(growable: growable); |
355 | 356 |
356 Set<E> toSet() => _source.toSet(); | 357 Set<E> toSet() => _source.toSet(); |
357 | 358 |
358 Iterable<E> where(bool test(E element)) => _source.where(test); | 359 Iterable<E> where(bool test(E element)) => _source.where(test); |
359 } | 360 } |
OLD | NEW |