OLD | NEW |
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(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: identityHashCodeOf) | 104 * hashCode: identityHashCode) |
105 */ | 105 */ |
106 external factory HashSet.identity(); | 106 external factory HashSet.identity(); |
107 | 107 |
108 /** | 108 /** |
109 * Create a hash set containing all [elements]. | 109 * Create a hash set containing all [elements]. |
110 * | 110 * |
111 * Creates a hash set as by `new HashSet<E>()` and adds each element of | 111 * Creates a hash set as by `new HashSet<E>()` and adds each element of |
112 * `elements` to this set in the order they are iterated. | 112 * `elements` to this set in the order they are iterated. |
113 * | 113 * |
114 * All the [elements] should be assignable to [E]. | 114 * All the [elements] should be assignable to [E]. |
(...skipping 11 matching lines...) Expand all Loading... |
126 } | 126 } |
127 | 127 |
128 /** | 128 /** |
129 * Provides an iterator that iterates over the elements of this set. | 129 * Provides an iterator that iterates over the elements of this set. |
130 * | 130 * |
131 * The order of iteration is unspecified, | 131 * The order of iteration is unspecified, |
132 * but consistent between changes to the set. | 132 * but consistent between changes to the set. |
133 */ | 133 */ |
134 Iterator<E> get iterator; | 134 Iterator<E> get iterator; |
135 } | 135 } |
OLD | NEW |