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

Side by Side Diff: corelib/src/set.dart

Issue 8931011: Update corelib to revised factory syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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 | « corelib/src/regexp.dart ('k') | corelib/src/stopwatch.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 /** 5 /**
6 * This class is the public interface of a set. A set is a collection 6 * This class is the public interface of a set. A set is a collection
7 * without duplicates. 7 * without duplicates.
8 */ 8 */
9 interface Set<E> extends Collection<E> 9 interface Set<E> extends Collection<E>
10 factory HashSetImplementation { 10 default HashSetImplementation<E extends Hashable> {
11 // See issue 417. Works in the vm, fails in dartc and frog.
12 Set(); 11 Set();
13 12
14 /** 13 /**
15 * Creates a [Set] that contains all elements of [other]. 14 * Creates a [Set] that contains all elements of [other].
16 */ 15 */
17 Set.from(Iterable<E> other); 16 Set.from(Iterable<E> other);
18 17
19 /** 18 /**
20 * Returns true if [value] is in the set. 19 * Returns true if [value] is in the set.
21 */ 20 */
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 Set<E> intersection(Collection<E> other); 62 Set<E> intersection(Collection<E> other);
64 63
65 /** 64 /**
66 * Removes all elements in the set. 65 * Removes all elements in the set.
67 */ 66 */
68 void clear(); 67 void clear();
69 68
70 } 69 }
71 70
72 interface HashSet<E extends Hashable> extends Set<E> 71 interface HashSet<E extends Hashable> extends Set<E>
73 factory HashSetImplementation { 72 default HashSetImplementation<E extends Hashable> {
74 // See issue 417. Works in the vm, fails in dartc and frog.
75 HashSet(); 73 HashSet();
76 74
77 /** 75 /**
78 * Creates a [Set] that contains all elements of [other]. 76 * Creates a [Set] that contains all elements of [other].
79 */ 77 */
80 HashSet.from(Iterable<E> other); 78 HashSet.from(Iterable<E> other);
81 } 79 }
OLDNEW
« no previous file with comments | « corelib/src/regexp.dart ('k') | corelib/src/stopwatch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698