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