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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_array.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 | « sdk/lib/_collection_dev/list.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/lib/js_array.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
index cbdacad46eaf946ecd0fc132b702d6362648cb4c..10059c788a114df3c6396617c70f4cb1819b0969 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
@@ -51,14 +51,14 @@ class JSArray<E> implements List<E>, JSIndexable {
IterableMixinWorkaround.retainAll(this, elements);
}
- void removeMatching(bool test(E element)) {
+ void removeWhere(bool test(E element)) {
// This could, and should, be optimized.
- IterableMixinWorkaround.removeMatchingList(this, test);
+ IterableMixinWorkaround.removeWhereList(this, test);
}
- void retainMatching(bool test(E element)) {
- IterableMixinWorkaround.removeMatchingList(this,
- (E element) => !test(element));
+ void retainWhere(bool test(E element)) {
+ IterableMixinWorkaround.removeWhereList(this,
+ (E element) => !test(element));
}
Iterable<E> where(bool f(E element)) {
@@ -121,16 +121,16 @@ class JSArray<E> implements List<E>, JSIndexable {
return IterableMixinWorkaround.reduce(this, initialValue, combine);
}
- E firstMatching(bool test(E value), {E orElse()}) {
- return IterableMixinWorkaround.firstMatching(this, test, orElse);
+ E firstWhere(bool test(E value), {E orElse()}) {
+ return IterableMixinWorkaround.firstWhere(this, test, orElse);
}
- E lastMatching(bool test(E value), {E orElse()}) {
- return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
+ E lastWhere(bool test(E value), {E orElse()}) {
+ return IterableMixinWorkaround.lastWhereList(this, test, orElse);
}
- E singleMatching(bool test(E value)) {
- return IterableMixinWorkaround.singleMatching(this, test);
+ E singleWhere(bool test(E value)) {
+ return IterableMixinWorkaround.singleWhere(this, test);
}
E elementAt(int index) {
« no previous file with comments | « sdk/lib/_collection_dev/list.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698