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

Side by Side Diff: lib/src/typed_wrappers.dart

Issue 2418763002: Update Set.difference to take a Set<Object>. (Closed)
Patch Set: Updated version number. Created 4 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
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/wrappers.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import "dart:collection"; 5 import "dart:collection";
6 import "dart:math" as math; 6 import "dart:math" as math;
7 7
8 import "wrappers.dart"; 8 import "wrappers.dart";
9 9
10 typedef F _UnaryFunction<E, F>(E argument); 10 typedef F _UnaryFunction<E, F>(E argument);
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 void addAll(Iterable<E> elements) { 219 void addAll(Iterable<E> elements) {
220 _setBase.addAll(elements); 220 _setBase.addAll(elements);
221 } 221 }
222 222
223 void clear() { 223 void clear() {
224 _setBase.clear(); 224 _setBase.clear();
225 } 225 }
226 226
227 bool containsAll(Iterable<Object> other) => _setBase.containsAll(other); 227 bool containsAll(Iterable<Object> other) => _setBase.containsAll(other);
228 228
229 Set<E> difference(Set<E> other) => 229 Set<E> difference(Set<Object> other) =>
230 new TypeSafeSet<E>(_setBase.difference(other)); 230 new TypeSafeSet<E>(_setBase.difference(other));
231 231
232 Set<E> intersection(Set<Object> other) => 232 Set<E> intersection(Set<Object> other) =>
233 new TypeSafeSet<E>(_setBase.intersection(other)); 233 new TypeSafeSet<E>(_setBase.intersection(other));
234 234
235 E lookup(Object element) => _setBase.lookup(element) as E; 235 E lookup(Object element) => _setBase.lookup(element) as E;
236 236
237 bool remove(Object value) => _setBase.remove(value); 237 bool remove(Object value) => _setBase.remove(value);
238 238
239 void removeAll(Iterable<Object> elements) { 239 void removeAll(Iterable<Object> elements) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 int get length => _base.length; 340 int get length => _base.length;
341 341
342 V putIfAbsent(K key, V ifAbsent()) => _base.putIfAbsent(key, ifAbsent) as V; 342 V putIfAbsent(K key, V ifAbsent()) => _base.putIfAbsent(key, ifAbsent) as V;
343 343
344 V remove(Object key) => _base.remove(key) as V; 344 V remove(Object key) => _base.remove(key) as V;
345 345
346 Iterable<V> get values => new TypeSafeIterable<V>(_base.values); 346 Iterable<V> get values => new TypeSafeIterable<V>(_base.values);
347 347
348 String toString() => _base.toString(); 348 String toString() => _base.toString();
349 } 349 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/wrappers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698