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

Side by Side Diff: sdk/lib/collection/hash_set.dart

Issue 292323006: Remove uses of IterableMixinWorkaround outside of VM and dart2js lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | sdk/lib/collection/iterable.dart » ('j') | sdk/lib/collection/iterable.dart » ('J')
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 part of dart.collection; 5 part of dart.collection;
6 6
7 /** Common parts of [HashSet] and [LinkedHashSet] implementations. */ 7 /** Common parts of [HashSet] and [LinkedHashSet] implementations. */
8 abstract class _HashSetBase<E> extends SetBase<E> { 8 abstract class _HashSetBase<E> extends SetBase<E> {
9 9
10 // The following two methods override the ones in SetBase. 10 // The following two methods override the ones in SetBase.
(...skipping 14 matching lines...) Expand all
25 if (other.contains(element)) result.add(element); 25 if (other.contains(element)) result.add(element);
26 } 26 }
27 return result; 27 return result;
28 } 28 }
29 29
30 Set<E> _newSet(); 30 Set<E> _newSet();
31 31
32 // Subclasses can optimize this further. 32 // Subclasses can optimize this further.
33 Set<E> toSet() => _newSet()..addAll(this); 33 Set<E> toSet() => _newSet()..addAll(this);
34 34
35 String toString() => IterableMixinWorkaround.toStringIterable(this, '{', '}'); 35 String toString() => _setToString(this);
36 } 36 }
37 37
38 /** 38 /**
39 * An unordered hash-table based [Set] implementation. 39 * An unordered hash-table based [Set] implementation.
40 * 40 *
41 * The elements of a `HashSet` must have consistent equality 41 * The elements of a `HashSet` must have consistent equality
42 * and hashCode implementations. This means that the equals operation 42 * and hashCode implementations. This means that the equals operation
43 * must define a stable equivalence relation on the elements (reflexive, 43 * must define a stable equivalence relation on the elements (reflexive,
44 * anti-symmetric, transitive, and consistent over time), and that the hashCode 44 * anti-symmetric, transitive, and consistent over time), and that the hashCode
45 * must consistent with equality, so that the same for objects that are 45 * must consistent with equality, so that the same for objects that are
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 /** 99 /**
100 * Provides an iterator that iterates over the elements of this set. 100 * Provides an iterator that iterates over the elements of this set.
101 * 101 *
102 * The order of iteration is unspecified, 102 * The order of iteration is unspecified,
103 * but consistent between changes to the set. 103 * but consistent between changes to the set.
104 */ 104 */
105 Iterator<E> get iterator; 105 Iterator<E> get iterator;
106 } 106 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/collection/iterable.dart » ('j') | sdk/lib/collection/iterable.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698