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

Unified Diff: corelib/src/collection.dart

Issue 10890030: Move core and coreimpl from corelib/ to lib/core and lib/coreimpl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 years, 4 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 | « corelib/src/bool.dart ('k') | corelib/src/comparable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/collection.dart
diff --git a/corelib/src/collection.dart b/corelib/src/collection.dart
deleted file mode 100644
index b6f656a635194edd69dd55aae5c50e27023e316a..0000000000000000000000000000000000000000
--- a/corelib/src/collection.dart
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2011, 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.
-
-/**
- * The [Collection] interface is the public interface of all
- * collections.
- */
-interface Collection<E> extends Iterable<E> {
- /**
- * Applies the function [f] to each element of this collection.
- */
- void forEach(void f(E element));
-
- /**
- * Returns a new collection with the elements [: f(e) :]
- * for each element [:e:] of this collection.
- *
- * Note on typing: the return type of f() could be an arbitrary
- * type and consequently the returned collection's
- * typeis Collection.
- */
- Collection map(f(E element));
-
- /**
- * Reduce a collection to a single value by iteratively combining each element
- * of the collection with an existing value using the provided function.
- * Use [initialValue] as the initial value, and the function [combine] to
- * create a new value from the previous one and an element.
- *
- * Example of calculating the sum of a collection:
- *
- * collection.reduce(0, (prev, element) => prev + element);
- */
- Dynamic reduce(Dynamic initialValue,
- Dynamic combine(Dynamic previousValue, E element));
-
- /**
- * Returns a new collection with the elements of this collection
- * that satisfy the predicate [f].
- *
- * An element satisfies the predicate [f] if [:f(element):]
- * returns true.
- */
- Collection<E> filter(bool f(E element));
-
- /**
- * Returns true if every elements of this collection satisify the
- * predicate [f]. Returns false otherwise.
- */
- bool every(bool f(E element));
-
- /**
- * Returns true if one element of this collection satisfies the
- * predicate [f]. Returns false otherwise.
- */
- bool some(bool f(E element));
-
- /**
- * Returns true if there is no element in this collection.
- */
- bool isEmpty();
-
- /**
- * Returns the number of elements in this collection.
- */
- int get length();
-}
« no previous file with comments | « corelib/src/bool.dart ('k') | corelib/src/comparable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698