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

Unified Diff: sdk/lib/collection/set.dart

Issue 11867024: Move some core classes to collection library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with bug number. Created 7 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/collection/queue.dart ('k') | sdk/lib/core/core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/set.dart
diff --git a/sdk/lib/core/set.dart b/sdk/lib/collection/set.dart
similarity index 64%
copy from sdk/lib/core/set.dart
copy to sdk/lib/collection/set.dart
index 556c1fa12539554eb10f32590043a4359293ac88..9363676e867eccee06f9a299397fb50a0c97806d 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/collection/set.dart
@@ -1,62 +1,9 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-part of dart.core;
+part of dart.collection;
-/**
- * This class is the public interface of a set. A set is a collection
- * without duplicates.
- */
-abstract class Set<E> extends Collection<E> {
- factory Set() => new HashSet<E>();
-
- /**
- * Creates a [Set] that contains all elements of [other].
- */
- factory Set.from(Iterable<E> other) => new HashSet<E>.from(other);
-
- /**
- * Returns true if [value] is in the set.
- */
- bool contains(E value);
-
- /**
- * Adds [value] into the set. The method has no effect if
- * [value] was already in the set.
- */
- void add(E value);
-
- /**
- * Removes [value] from the set. Returns true if [value] was
- * in the set. Returns false otherwise. The method has no effect
- * if [value] value was not in the set.
- */
- bool remove(Object value);
-
- /**
- * Returns true if [collection] contains all the elements of this
- * collection.
- */
- bool isSubsetOf(Collection<E> collection);
-
- /**
- * Returns true if this collection contains all the elements of
- * [collection].
- */
- bool containsAll(Collection<E> collection);
-
- /**
- * Returns a new set which is the intersection between this set and
- * the given collection.
- */
- Set<E> intersection(Collection<E> other);
-
- /**
- * Removes all elements in the set.
- */
- void clear();
-}
class HashSet<E> extends Collection<E> implements Set<E> {
« no previous file with comments | « sdk/lib/collection/queue.dart ('k') | sdk/lib/core/core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698