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

Side by Side Diff: client/dom/frog/dom_frog.dart

Issue 9114021: Added method map to Collection interface and all its implementations (except classes generated fr... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #library('dom'); 1 #library('dom');
2 2
3 #native('dom_frog.js'); 3 #native('dom_frog.js');
4 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 4 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
5 // for details. All rights reserved. Use of this source code is governed by a 5 // for details. All rights reserved. Use of this source code is governed by a
6 // BSD-style license that can be found in the LICENSE file. 6 // BSD-style license that can be found in the LICENSE file.
7 7
8 // DO NOT EDIT 8 // DO NOT EDIT
9 // Auto-generated Dart DOM library. 9 // Auto-generated Dart DOM library.
10 10
(...skipping 11995 matching lines...) Expand 10 before | Expand all | Expand 10 after
12006 return false; 12006 return false;
12007 } 12007 }
12008 12008
12009 static bool every(Iterable<Object> iterable, bool f(Object o)) { 12009 static bool every(Iterable<Object> iterable, bool f(Object o)) {
12010 for (final e in iterable) { 12010 for (final e in iterable) {
12011 if (!f(e)) return false; 12011 if (!f(e)) return false;
12012 } 12012 }
12013 return true; 12013 return true;
12014 } 12014 }
12015 12015
12016 static List map(Iterable<Object> source,
12017 List<Object> destination,
ahe 2012/01/05 22:36:54 Indentation.
sra1 2012/01/05 22:46:49 This file is generated, don't bother fixing here,
12018 f(o)) {
ahe 2012/01/05 22:36:54 Indentation.
12019 for (final e in source) {
12020 destination.add(f(e));
12021 }
12022 return destination;
12023 }
12024
12016 static List filter(Iterable<Object> source, 12025 static List filter(Iterable<Object> source,
12017 List<Object> destination, 12026 List<Object> destination,
12018 bool f(o)) { 12027 bool f(o)) {
ahe 2012/01/05 22:36:54 Please follow this style.
12019 for (final e in source) { 12028 for (final e in source) {
12020 if (f(e)) destination.add(e); 12029 if (f(e)) destination.add(e);
12021 } 12030 }
12022 return destination; 12031 return destination;
12023 } 12032 }
12024 12033
12025 static bool isEmpty(Iterable<Object> iterable) { 12034 static bool isEmpty(Iterable<Object> iterable) {
12026 return !iterable.iterator().hasNext(); 12035 return !iterable.iterator().hasNext();
12027 } 12036 }
12028 } 12037 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
12101 startIndex = a.length - 1; 12110 startIndex = a.length - 1;
12102 } 12111 }
12103 for (int i = startIndex; i >= 0; i--) { 12112 for (int i = startIndex; i >= 0; i--) {
12104 if (a[i] == element) { 12113 if (a[i] == element) {
12105 return i; 12114 return i;
12106 } 12115 }
12107 } 12116 }
12108 return -1; 12117 return -1;
12109 } 12118 }
12110 } 12119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698