Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: pkg/unmodifiable_collection/lib/unmodifiable_collection.dart

Issue 26280002: Set.add returns true if item has been added, otherwise false (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: again Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/lib/collection_patch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/collection_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698