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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 E lookup(Object object) => _source.lookup(object); |
183 | 183 |
184 /** | 184 /** |
185 * Throws an [UnsupportedError]; | 185 * Throws an [UnsupportedError]; |
186 * operations that change the set are disallowed. | 186 * operations that change the set are disallowed. |
187 */ | 187 */ |
188 void add(E value) => _throw(); | 188 bool add(E value) => _throw(); |
189 | 189 |
190 /** | 190 /** |
191 * Throws an [UnsupportedError]; | 191 * Throws an [UnsupportedError]; |
192 * operations that change the set are disallowed. | 192 * operations that change the set are disallowed. |
193 */ | 193 */ |
194 void addAll(Iterable<E> elements) => _throw(); | 194 void addAll(Iterable<E> elements) => _throw(); |
195 | 195 |
196 /** | 196 /** |
197 * Throws an [UnsupportedError]; | 197 * Throws an [UnsupportedError]; |
198 * operations that change the set are disallowed. | 198 * operations that change the set are disallowed. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 Iterable<E> take(int n) => _source.take(n); | 351 Iterable<E> take(int n) => _source.take(n); |
352 | 352 |
353 Iterable<E> takeWhile(bool test(E value)) => _source.takeWhile(test); | 353 Iterable<E> takeWhile(bool test(E value)) => _source.takeWhile(test); |
354 | 354 |
355 List<E> toList({ bool growable: true }) => _source.toList(growable: growable); | 355 List<E> toList({ bool growable: true }) => _source.toList(growable: growable); |
356 | 356 |
357 Set<E> toSet() => _source.toSet(); | 357 Set<E> toSet() => _source.toSet(); |
358 | 358 |
359 Iterable<E> where(bool test(E element)) => _source.where(test); | 359 Iterable<E> where(bool test(E element)) => _source.where(test); |
360 } | 360 } |
OLD | NEW |