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

Side by Side Diff: sdk/lib/core/set.dart

Issue 2467113003: Make EfficientLength extend Iterable. (Closed)
Patch Set: Reverted, prepare to reland. Make new test not break web-testing framework. Created 4 years, 1 month 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 | « sdk/lib/core/list.dart ('k') | sdk/lib/internal/iterable.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * A collection of objects in which each object can occur only once. 8 * A collection of objects in which each object can occur only once.
9 * 9 *
10 * That is, for each object of the element type, the object is either considered 10 * That is, for each object of the element type, the object is either considered
(...skipping 13 matching lines...) Expand all
24 * uspecified, 24 * uspecified,
25 * * [LinkedHashSet] iterates in the insertion order of its elements, and 25 * * [LinkedHashSet] iterates in the insertion order of its elements, and
26 * * a sorted set like [SplayTreeSet] iterates the elements in sorted order. 26 * * a sorted set like [SplayTreeSet] iterates the elements in sorted order.
27 * 27 *
28 * It is generally not allowed to modify the set (add or remove elements) while 28 * It is generally not allowed to modify the set (add or remove elements) while
29 * an operation on the set is being performed, for example during a call to 29 * an operation on the set is being performed, for example during a call to
30 * [forEach] or [containsAll]. Nor is it allowed to modify the set while 30 * [forEach] or [containsAll]. Nor is it allowed to modify the set while
31 * iterating either the set itself or any [Iterable] that is backed by the set, 31 * iterating either the set itself or any [Iterable] that is backed by the set,
32 * such as the ones returned by methods like [where] and [map]. 32 * such as the ones returned by methods like [where] and [map].
33 */ 33 */
34 abstract class Set<E> extends Iterable<E> implements EfficientLength { 34 abstract class Set<E> extends EfficientLengthIterable<E> {
35 /** 35 /**
36 * Creates an empty [Set]. 36 * Creates an empty [Set].
37 * 37 *
38 * The created [Set] is a plain [LinkedHashSet]. 38 * The created [Set] is a plain [LinkedHashSet].
39 * As such, it considers elements that are equal (using [==]) to be 39 * As such, it considers elements that are equal (using [==]) to be
40 * indistinguishable, and requires them to have a compatible 40 * indistinguishable, and requires them to have a compatible
41 * [Object.hashCode] implementation. 41 * [Object.hashCode] implementation.
42 * 42 *
43 * The set is equivalent to one created by `new LinkedHashSet<E>()`. 43 * The set is equivalent to one created by `new LinkedHashSet<E>()`.
44 */ 44 */
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 /* Creates a [Set] with the same elements and behavior as this `Set`. 195 /* Creates a [Set] with the same elements and behavior as this `Set`.
196 * 196 *
197 * The returned set behaves the same as this set 197 * The returned set behaves the same as this set
198 * with regard to adding and removing elements. 198 * with regard to adding and removing elements.
199 * It initially contains the same elements. 199 * It initially contains the same elements.
200 * If this set specifies an ordering of the elements, 200 * If this set specifies an ordering of the elements,
201 * the returned set will have the same order. 201 * the returned set will have the same order.
202 */ 202 */
203 Set<E> toSet(); 203 Set<E> toSet();
204 } 204 }
OLDNEW
« no previous file with comments | « sdk/lib/core/list.dart ('k') | sdk/lib/internal/iterable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698