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

Unified Diff: sdk/lib/_collection_dev/iterable.dart

Issue 12537009: Rename XMatching to XWhere. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge and rebuild dom libraries. Created 7 years, 9 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 | « samples/swarm/swarm_ui_lib/observable/observable.dart ('k') | sdk/lib/_collection_dev/list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_collection_dev/iterable.dart
diff --git a/sdk/lib/_collection_dev/iterable.dart b/sdk/lib/_collection_dev/iterable.dart
index 0ae6c67664eb48fe57b1951fdeca96329ac40c32..25515a9f9a63f65a5d948ff78162a9bac32458bc 100644
--- a/sdk/lib/_collection_dev/iterable.dart
+++ b/sdk/lib/_collection_dev/iterable.dart
@@ -79,7 +79,7 @@ abstract class ListIterable<E> extends Iterable<E> {
return false;
}
- E firstMatching(bool test(E element), { E orElse() }) {
+ E firstWhere(bool test(E element), { E orElse() }) {
int length = this.length;
for (int i = 0; i < length; i++) {
E element = elementAt(i);
@@ -92,7 +92,7 @@ abstract class ListIterable<E> extends Iterable<E> {
throw new StateError("No matching element");
}
- E lastMatching(bool test(E element), { E orElse() }) {
+ E lastWhere(bool test(E element), { E orElse() }) {
int length = this.length;
for (int i = length - 1; i >= 0; i--) {
E element = elementAt(i);
@@ -105,7 +105,7 @@ abstract class ListIterable<E> extends Iterable<E> {
throw new StateError("No matching element");
}
- E singleMatching(bool test(E element)) {
+ E singleWhere(bool test(E element)) {
int length = this.length;
E match = null;
bool matchFound = false;
@@ -644,17 +644,17 @@ class EmptyIterable<E> extends Iterable<E> {
bool any(bool test(E element)) => false;
- E firstMatching(bool test(E element), { E orElse() }) {
+ E firstWhere(bool test(E element), { E orElse() }) {
if (orElse != null) return orElse();
throw new StateError("No matching element");
}
- E lastMatching(bool test(E element), { E orElse() }) {
+ E lastWhere(bool test(E element), { E orElse() }) {
if (orElse != null) return orElse();
throw new StateError("No matching element");
}
- E singleMatching(bool test(E element), { E orElse() }) {
+ E singleWhere(bool test(E element), { E orElse() }) {
if (orElse != null) return orElse();
throw new StateError("No matching element");
}
« no previous file with comments | « samples/swarm/swarm_ui_lib/observable/observable.dart ('k') | sdk/lib/_collection_dev/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698