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

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

Issue 26832002: Add Set.lookup method to get the instance in the set. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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