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

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

Issue 8921033: Implement revised factories in the VM. (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
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/*<E extends Hashable>*/ { 10 factory HashSetImplementation {
11 // See issue 417. Works in the vm, fails in dartc and frog. 11 // See issue 417. Works in the vm, fails in dartc and frog.
12 Set(); 12 Set();
13 13
14 /** 14 /**
15 * Creates a [Set] that contains all elements of [other]. 15 * Creates a [Set] that contains all elements of [other].
16 */ 16 */
17 Set.from(Iterable<E> other); 17 Set.from(Iterable<E> other);
18 18
19 /** 19 /**
20 * Returns true if [value] is in the set. 20 * Returns true if [value] is in the set.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 Set<E> intersection(Collection<E> other); 63 Set<E> intersection(Collection<E> other);
64 64
65 /** 65 /**
66 * Removes all elements in the set. 66 * Removes all elements in the set.
67 */ 67 */
68 void clear(); 68 void clear();
69 69
70 } 70 }
71 71
72 interface HashSet<E extends Hashable> extends Set<E> 72 interface HashSet<E extends Hashable> extends Set<E>
73 factory HashSetImplementation/*<E extends Hashable>*/ { 73 factory HashSetImplementation {
74 // See issue 417. Works in the vm, fails in dartc and frog. 74 // See issue 417. Works in the vm, fails in dartc and frog.
75 HashSet(); 75 HashSet();
76 76
77 /** 77 /**
78 * Creates a [Set] that contains all elements of [other]. 78 * Creates a [Set] that contains all elements of [other].
79 */ 79 */
80 HashSet.from(Iterable<E> other); 80 HashSet.from(Iterable<E> other);
81 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698