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

Side by Side Diff: tool/input_sdk/lib/collection/hash_set.dart

Issue 1987043002: Updates to collection_patch.dart (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Created 4 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 * The default equality and hashcode operations are assumed to work on all 86 * The default equality and hashcode operations are assumed to work on all
87 * objects. 87 * objects.
88 * 88 *
89 * Likewise, if `equals` is [identical], `hashCode` is [identityHashCode] 89 * Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
90 * and `isValidKey` is omitted, the resulting set is identity based, 90 * and `isValidKey` is omitted, the resulting set is identity based,
91 * and the `isValidKey` defaults to accepting all keys. 91 * and the `isValidKey` defaults to accepting all keys.
92 * Such a map can be created directly using [HashSet.identity]. 92 * Such a map can be created directly using [HashSet.identity].
93 */ 93 */
94 external factory HashSet({bool equals(E e1, E e2), 94 external factory HashSet({bool equals(E e1, E e2),
95 int hashCode(E e), 95 int hashCode(E e),
96 bool isValidKey(potentialKey)}); 96 bool isValidKey(Object potentialKey)});
97 97
98 /** 98 /**
99 * Creates an unordered identity-based set. 99 * Creates an unordered identity-based set.
100 * 100 *
101 * Effectively a shorthand for: 101 * Effectively a shorthand for:
102 * 102 *
103 * new HashSet<E>(equals: identical, 103 * new HashSet<E>(equals: identical,
104 * hashCode: identityHashCode) 104 * hashCode: identityHashCode)
105 */ 105 */
106 external factory HashSet.identity(); 106 external factory HashSet.identity();
(...skipping 22 matching lines...) Expand all
129 } 129 }
130 130
131 /** 131 /**
132 * Provides an iterator that iterates over the elements of this set. 132 * Provides an iterator that iterates over the elements of this set.
133 * 133 *
134 * The order of iteration is unspecified, 134 * The order of iteration is unspecified,
135 * but consistent between changes to the set. 135 * but consistent between changes to the set.
136 */ 136 */
137 Iterator<E> get iterator; 137 Iterator<E> get iterator;
138 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698