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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11971016: Create IterableMixinWorkaround and move most of the Collections methods there. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo (mappedByList instead of mappedBy). 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/collection/collections.dart ('k') | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library html; 1 library html;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'dart:html_common'; 5 import 'dart:html_common';
6 import 'dart:indexed_db'; 6 import 'dart:indexed_db';
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 import 'dart:json' as json; 8 import 'dart:json' as json;
9 import 'dart:math'; 9 import 'dart:math';
10 import 'dart:svg' as svg; 10 import 'dart:svg' as svg;
(...skipping 6651 matching lines...) Expand 10 before | Expand all | Expand 10 after
6662 // From Iterable<DomMimeType>: 6662 // From Iterable<DomMimeType>:
6663 6663
6664 Iterator<DomMimeType> get iterator { 6664 Iterator<DomMimeType> get iterator {
6665 // Note: NodeLists are not fixed size. And most probably length shouldn't 6665 // Note: NodeLists are not fixed size. And most probably length shouldn't
6666 // be cached in both iterator _and_ forEach method. For now caching it 6666 // be cached in both iterator _and_ forEach method. For now caching it
6667 // for consistency. 6667 // for consistency.
6668 return new FixedSizeListIterator<DomMimeType>(this); 6668 return new FixedSizeListIterator<DomMimeType>(this);
6669 } 6669 }
6670 6670
6671 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, DomMimeType)) { 6671 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, DomMimeType)) {
6672 return Collections.reduce(this, initialValue, combine); 6672 return IterableMixinWorkaround.reduce(this, initialValue, combine);
6673 } 6673 }
6674 6674
6675 bool contains(DomMimeType element) => Collections.contains(this, element); 6675 bool contains(DomMimeType element) => IterableMixinWorkaround.contains(this, e lement);
6676 6676
6677 void forEach(void f(DomMimeType element)) => Collections.forEach(this, f); 6677 void forEach(void f(DomMimeType element)) => IterableMixinWorkaround.forEach(t his, f);
6678 6678
6679 String join([String separator]) => Collections.joinList(this, separator); 6679 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
6680 6680
6681 List mappedBy(f(DomMimeType element)) => new MappedList<DomMimeType, dynamic>( this, f); 6681 List mappedBy(f(DomMimeType element)) => IterableMixinWorkaround.mappedByList( this, f);
6682 6682
6683 Iterable<DomMimeType> where(bool f(DomMimeType element)) => new WhereIterable< DomMimeType>(this, f); 6683 Iterable<DomMimeType> where(bool f(DomMimeType element)) => IterableMixinWorka round.where(this, f);
6684 6684
6685 bool every(bool f(DomMimeType element)) => Collections.every(this, f); 6685 bool every(bool f(DomMimeType element)) => IterableMixinWorkaround.every(this, f);
6686 6686
6687 bool any(bool f(DomMimeType element)) => Collections.any(this, f); 6687 bool any(bool f(DomMimeType element)) => IterableMixinWorkaround.any(this, f);
6688 6688
6689 List<DomMimeType> toList() => new List<DomMimeType>.from(this); 6689 List<DomMimeType> toList() => new List<DomMimeType>.from(this);
6690 Set<DomMimeType> toSet() => new Set<DomMimeType>.from(this); 6690 Set<DomMimeType> toSet() => new Set<DomMimeType>.from(this);
6691 6691
6692 bool get isEmpty => this.length == 0; 6692 bool get isEmpty => this.length == 0;
6693 6693
6694 List<DomMimeType> take(int n) => new ListView<DomMimeType>(this, 0, n); 6694 List<DomMimeType> take(int n) => IterableMixinWorkaround.takeList(this, n);
6695 6695
6696 Iterable<DomMimeType> takeWhile(bool test(DomMimeType value)) { 6696 Iterable<DomMimeType> takeWhile(bool test(DomMimeType value)) {
6697 return new TakeWhileIterable<DomMimeType>(this, test); 6697 return IterableMixinWorkaround.takeWhile(this, test);
6698 } 6698 }
6699 6699
6700 List<DomMimeType> skip(int n) => new ListView<DomMimeType>(this, n, null); 6700 List<DomMimeType> skip(int n) => IterableMixinWorkaround.skipList(this, n);
6701 6701
6702 Iterable<DomMimeType> skipWhile(bool test(DomMimeType value)) { 6702 Iterable<DomMimeType> skipWhile(bool test(DomMimeType value)) {
6703 return new SkipWhileIterable<DomMimeType>(this, test); 6703 return IterableMixinWorkaround.skipWhile(this, test);
6704 } 6704 }
6705 6705
6706 DomMimeType firstMatching(bool test(DomMimeType value), { DomMimeType orElse() }) { 6706 DomMimeType firstMatching(bool test(DomMimeType value), { DomMimeType orElse() }) {
6707 return Collections.firstMatching(this, test, orElse); 6707 return IterableMixinWorkaround.firstMatching(this, test, orElse);
6708 } 6708 }
6709 6709
6710 DomMimeType lastMatching(bool test(DomMimeType value), {DomMimeType orElse()}) { 6710 DomMimeType lastMatching(bool test(DomMimeType value), {DomMimeType orElse()}) {
6711 return Collections.lastMatchingInList(this, test, orElse); 6711 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
6712 } 6712 }
6713 6713
6714 DomMimeType singleMatching(bool test(DomMimeType value)) { 6714 DomMimeType singleMatching(bool test(DomMimeType value)) {
6715 return Collections.singleMatching(this, test); 6715 return IterableMixinWorkaround.singleMatching(this, test);
6716 } 6716 }
6717 6717
6718 DomMimeType elementAt(int index) { 6718 DomMimeType elementAt(int index) {
6719 return this[index]; 6719 return this[index];
6720 } 6720 }
6721 6721
6722 // From Collection<DomMimeType>: 6722 // From Collection<DomMimeType>:
6723 6723
6724 void add(DomMimeType value) { 6724 void add(DomMimeType value) {
6725 throw new UnsupportedError("Cannot add to immutable List."); 6725 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
6763 if (this.length > 0) return this[this.length - 1]; 6763 if (this.length > 0) return this[this.length - 1];
6764 throw new StateError("No elements"); 6764 throw new StateError("No elements");
6765 } 6765 }
6766 6766
6767 DomMimeType get single { 6767 DomMimeType get single {
6768 if (length == 1) return this[0]; 6768 if (length == 1) return this[0];
6769 if (length == 0) throw new StateError("No elements"); 6769 if (length == 0) throw new StateError("No elements");
6770 throw new StateError("More than one element"); 6770 throw new StateError("More than one element");
6771 } 6771 }
6772 6772
6773 DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) => Collections.mi n(this, compare); 6773 DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) => IterableMixinW orkaround.min(this, compare);
6774 6774
6775 DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) => Collections.ma x(this, compare); 6775 DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) => IterableMixinW orkaround.max(this, compare);
6776 6776
6777 DomMimeType removeAt(int pos) { 6777 DomMimeType removeAt(int pos) {
6778 throw new UnsupportedError("Cannot removeAt on immutable List."); 6778 throw new UnsupportedError("Cannot removeAt on immutable List.");
6779 } 6779 }
6780 6780
6781 DomMimeType removeLast() { 6781 DomMimeType removeLast() {
6782 throw new UnsupportedError("Cannot removeLast on immutable List."); 6782 throw new UnsupportedError("Cannot removeLast on immutable List.");
6783 } 6783 }
6784 6784
6785 void setRange(int start, int rangeLength, List<DomMimeType> from, [int startFr om]) { 6785 void setRange(int start, int rangeLength, List<DomMimeType> from, [int startFr om]) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
6874 // From Iterable<DomPlugin>: 6874 // From Iterable<DomPlugin>:
6875 6875
6876 Iterator<DomPlugin> get iterator { 6876 Iterator<DomPlugin> get iterator {
6877 // Note: NodeLists are not fixed size. And most probably length shouldn't 6877 // Note: NodeLists are not fixed size. And most probably length shouldn't
6878 // be cached in both iterator _and_ forEach method. For now caching it 6878 // be cached in both iterator _and_ forEach method. For now caching it
6879 // for consistency. 6879 // for consistency.
6880 return new FixedSizeListIterator<DomPlugin>(this); 6880 return new FixedSizeListIterator<DomPlugin>(this);
6881 } 6881 }
6882 6882
6883 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, DomPlugin)) { 6883 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, DomPlugin)) {
6884 return Collections.reduce(this, initialValue, combine); 6884 return IterableMixinWorkaround.reduce(this, initialValue, combine);
6885 } 6885 }
6886 6886
6887 bool contains(DomPlugin element) => Collections.contains(this, element); 6887 bool contains(DomPlugin element) => IterableMixinWorkaround.contains(this, ele ment);
6888 6888
6889 void forEach(void f(DomPlugin element)) => Collections.forEach(this, f); 6889 void forEach(void f(DomPlugin element)) => IterableMixinWorkaround.forEach(thi s, f);
6890 6890
6891 String join([String separator]) => Collections.joinList(this, separator); 6891 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
6892 6892
6893 List mappedBy(f(DomPlugin element)) => new MappedList<DomPlugin, dynamic>(this , f); 6893 List mappedBy(f(DomPlugin element)) => IterableMixinWorkaround.mappedByList(th is, f);
6894 6894
6895 Iterable<DomPlugin> where(bool f(DomPlugin element)) => new WhereIterable<DomP lugin>(this, f); 6895 Iterable<DomPlugin> where(bool f(DomPlugin element)) => IterableMixinWorkaroun d.where(this, f);
6896 6896
6897 bool every(bool f(DomPlugin element)) => Collections.every(this, f); 6897 bool every(bool f(DomPlugin element)) => IterableMixinWorkaround.every(this, f );
6898 6898
6899 bool any(bool f(DomPlugin element)) => Collections.any(this, f); 6899 bool any(bool f(DomPlugin element)) => IterableMixinWorkaround.any(this, f);
6900 6900
6901 List<DomPlugin> toList() => new List<DomPlugin>.from(this); 6901 List<DomPlugin> toList() => new List<DomPlugin>.from(this);
6902 Set<DomPlugin> toSet() => new Set<DomPlugin>.from(this); 6902 Set<DomPlugin> toSet() => new Set<DomPlugin>.from(this);
6903 6903
6904 bool get isEmpty => this.length == 0; 6904 bool get isEmpty => this.length == 0;
6905 6905
6906 List<DomPlugin> take(int n) => new ListView<DomPlugin>(this, 0, n); 6906 List<DomPlugin> take(int n) => IterableMixinWorkaround.takeList(this, n);
6907 6907
6908 Iterable<DomPlugin> takeWhile(bool test(DomPlugin value)) { 6908 Iterable<DomPlugin> takeWhile(bool test(DomPlugin value)) {
6909 return new TakeWhileIterable<DomPlugin>(this, test); 6909 return IterableMixinWorkaround.takeWhile(this, test);
6910 } 6910 }
6911 6911
6912 List<DomPlugin> skip(int n) => new ListView<DomPlugin>(this, n, null); 6912 List<DomPlugin> skip(int n) => IterableMixinWorkaround.skipList(this, n);
6913 6913
6914 Iterable<DomPlugin> skipWhile(bool test(DomPlugin value)) { 6914 Iterable<DomPlugin> skipWhile(bool test(DomPlugin value)) {
6915 return new SkipWhileIterable<DomPlugin>(this, test); 6915 return IterableMixinWorkaround.skipWhile(this, test);
6916 } 6916 }
6917 6917
6918 DomPlugin firstMatching(bool test(DomPlugin value), { DomPlugin orElse() }) { 6918 DomPlugin firstMatching(bool test(DomPlugin value), { DomPlugin orElse() }) {
6919 return Collections.firstMatching(this, test, orElse); 6919 return IterableMixinWorkaround.firstMatching(this, test, orElse);
6920 } 6920 }
6921 6921
6922 DomPlugin lastMatching(bool test(DomPlugin value), {DomPlugin orElse()}) { 6922 DomPlugin lastMatching(bool test(DomPlugin value), {DomPlugin orElse()}) {
6923 return Collections.lastMatchingInList(this, test, orElse); 6923 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
6924 } 6924 }
6925 6925
6926 DomPlugin singleMatching(bool test(DomPlugin value)) { 6926 DomPlugin singleMatching(bool test(DomPlugin value)) {
6927 return Collections.singleMatching(this, test); 6927 return IterableMixinWorkaround.singleMatching(this, test);
6928 } 6928 }
6929 6929
6930 DomPlugin elementAt(int index) { 6930 DomPlugin elementAt(int index) {
6931 return this[index]; 6931 return this[index];
6932 } 6932 }
6933 6933
6934 // From Collection<DomPlugin>: 6934 // From Collection<DomPlugin>:
6935 6935
6936 void add(DomPlugin value) { 6936 void add(DomPlugin value) {
6937 throw new UnsupportedError("Cannot add to immutable List."); 6937 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
6975 if (this.length > 0) return this[this.length - 1]; 6975 if (this.length > 0) return this[this.length - 1];
6976 throw new StateError("No elements"); 6976 throw new StateError("No elements");
6977 } 6977 }
6978 6978
6979 DomPlugin get single { 6979 DomPlugin get single {
6980 if (length == 1) return this[0]; 6980 if (length == 1) return this[0];
6981 if (length == 0) throw new StateError("No elements"); 6981 if (length == 0) throw new StateError("No elements");
6982 throw new StateError("More than one element"); 6982 throw new StateError("More than one element");
6983 } 6983 }
6984 6984
6985 DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) => Collections.min(this , compare); 6985 DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) => IterableMixinWorkaro und.min(this, compare);
6986 6986
6987 DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) => Collections.max(this , compare); 6987 DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) => IterableMixinWorkaro und.max(this, compare);
6988 6988
6989 DomPlugin removeAt(int pos) { 6989 DomPlugin removeAt(int pos) {
6990 throw new UnsupportedError("Cannot removeAt on immutable List."); 6990 throw new UnsupportedError("Cannot removeAt on immutable List.");
6991 } 6991 }
6992 6992
6993 DomPlugin removeLast() { 6993 DomPlugin removeLast() {
6994 throw new UnsupportedError("Cannot removeLast on immutable List."); 6994 throw new UnsupportedError("Cannot removeLast on immutable List.");
6995 } 6995 }
6996 6996
6997 void setRange(int start, int rangeLength, List<DomPlugin> from, [int startFrom ]) { 6997 void setRange(int start, int rangeLength, List<DomPlugin> from, [int startFrom ]) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
7145 // From Iterable<String>: 7145 // From Iterable<String>:
7146 7146
7147 Iterator<String> get iterator { 7147 Iterator<String> get iterator {
7148 // Note: NodeLists are not fixed size. And most probably length shouldn't 7148 // Note: NodeLists are not fixed size. And most probably length shouldn't
7149 // be cached in both iterator _and_ forEach method. For now caching it 7149 // be cached in both iterator _and_ forEach method. For now caching it
7150 // for consistency. 7150 // for consistency.
7151 return new FixedSizeListIterator<String>(this); 7151 return new FixedSizeListIterator<String>(this);
7152 } 7152 }
7153 7153
7154 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) { 7154 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) {
7155 return Collections.reduce(this, initialValue, combine); 7155 return IterableMixinWorkaround.reduce(this, initialValue, combine);
7156 } 7156 }
7157 7157
7158 // contains() defined by IDL. 7158 // contains() defined by IDL.
7159 7159
7160 void forEach(void f(String element)) => Collections.forEach(this, f); 7160 void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
7161 7161
7162 String join([String separator]) => Collections.joinList(this, separator); 7162 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
7163 7163
7164 List mappedBy(f(String element)) => new MappedList<String, dynamic>(this, f); 7164 List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this, f);
7165 7165
7166 Iterable<String> where(bool f(String element)) => new WhereIterable<String>(th is, f); 7166 Iterable<String> where(bool f(String element)) => IterableMixinWorkaround.wher e(this, f);
7167 7167
7168 bool every(bool f(String element)) => Collections.every(this, f); 7168 bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f);
7169 7169
7170 bool any(bool f(String element)) => Collections.any(this, f); 7170 bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f);
7171 7171
7172 List<String> toList() => new List<String>.from(this); 7172 List<String> toList() => new List<String>.from(this);
7173 Set<String> toSet() => new Set<String>.from(this); 7173 Set<String> toSet() => new Set<String>.from(this);
7174 7174
7175 bool get isEmpty => this.length == 0; 7175 bool get isEmpty => this.length == 0;
7176 7176
7177 List<String> take(int n) => new ListView<String>(this, 0, n); 7177 List<String> take(int n) => IterableMixinWorkaround.takeList(this, n);
7178 7178
7179 Iterable<String> takeWhile(bool test(String value)) { 7179 Iterable<String> takeWhile(bool test(String value)) {
7180 return new TakeWhileIterable<String>(this, test); 7180 return IterableMixinWorkaround.takeWhile(this, test);
7181 } 7181 }
7182 7182
7183 List<String> skip(int n) => new ListView<String>(this, n, null); 7183 List<String> skip(int n) => IterableMixinWorkaround.skipList(this, n);
7184 7184
7185 Iterable<String> skipWhile(bool test(String value)) { 7185 Iterable<String> skipWhile(bool test(String value)) {
7186 return new SkipWhileIterable<String>(this, test); 7186 return IterableMixinWorkaround.skipWhile(this, test);
7187 } 7187 }
7188 7188
7189 String firstMatching(bool test(String value), { String orElse() }) { 7189 String firstMatching(bool test(String value), { String orElse() }) {
7190 return Collections.firstMatching(this, test, orElse); 7190 return IterableMixinWorkaround.firstMatching(this, test, orElse);
7191 } 7191 }
7192 7192
7193 String lastMatching(bool test(String value), {String orElse()}) { 7193 String lastMatching(bool test(String value), {String orElse()}) {
7194 return Collections.lastMatchingInList(this, test, orElse); 7194 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
7195 } 7195 }
7196 7196
7197 String singleMatching(bool test(String value)) { 7197 String singleMatching(bool test(String value)) {
7198 return Collections.singleMatching(this, test); 7198 return IterableMixinWorkaround.singleMatching(this, test);
7199 } 7199 }
7200 7200
7201 String elementAt(int index) { 7201 String elementAt(int index) {
7202 return this[index]; 7202 return this[index];
7203 } 7203 }
7204 7204
7205 // From Collection<String>: 7205 // From Collection<String>:
7206 7206
7207 void add(String value) { 7207 void add(String value) {
7208 throw new UnsupportedError("Cannot add to immutable List."); 7208 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
7246 if (this.length > 0) return this[this.length - 1]; 7246 if (this.length > 0) return this[this.length - 1];
7247 throw new StateError("No elements"); 7247 throw new StateError("No elements");
7248 } 7248 }
7249 7249
7250 String get single { 7250 String get single {
7251 if (length == 1) return this[0]; 7251 if (length == 1) return this[0];
7252 if (length == 0) throw new StateError("No elements"); 7252 if (length == 0) throw new StateError("No elements");
7253 throw new StateError("More than one element"); 7253 throw new StateError("More than one element");
7254 } 7254 }
7255 7255
7256 String min([int compare(String a, String b)]) => Collections.min(this, compare ); 7256 String min([int compare(String a, String b)]) => IterableMixinWorkaround.min(t his, compare);
7257 7257
7258 String max([int compare(String a, String b)]) => Collections.max(this, compare ); 7258 String max([int compare(String a, String b)]) => IterableMixinWorkaround.max(t his, compare);
7259 7259
7260 String removeAt(int pos) { 7260 String removeAt(int pos) {
7261 throw new UnsupportedError("Cannot removeAt on immutable List."); 7261 throw new UnsupportedError("Cannot removeAt on immutable List.");
7262 } 7262 }
7263 7263
7264 String removeLast() { 7264 String removeLast() {
7265 throw new UnsupportedError("Cannot removeLast on immutable List."); 7265 throw new UnsupportedError("Cannot removeLast on immutable List.");
7266 } 7266 }
7267 7267
7268 void setRange(int start, int rangeLength, List<String> from, [int startFrom]) { 7268 void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
7374 bool any(bool f(Element element)) { 7374 bool any(bool f(Element element)) {
7375 for (Element element in this) { 7375 for (Element element in this) {
7376 if (f(element)) { 7376 if (f(element)) {
7377 return true; 7377 return true;
7378 } 7378 }
7379 } 7379 }
7380 return false; 7380 return false;
7381 } 7381 }
7382 7382
7383 String join([String separator]) { 7383 String join([String separator]) {
7384 return Collections.joinList(this, separator); 7384 return IterableMixinWorkaround.joinList(this, separator);
7385 } 7385 }
7386 7386
7387 List mappedBy(f(Element element)) { 7387 List mappedBy(f(Element element)) {
7388 return new MappedList<Element, dynamic>(this, f); 7388 return IterableMixinWorkaround.mappedByList(this, f);
7389 } 7389 }
7390 7390
7391 Iterable<Element> where(bool f(Element element)) 7391 Iterable<Element> where(bool f(Element element)) {
7392 => new WhereIterable(this, f); 7392 return IterableMixinWorkaround.where(this, f);
7393 }
7393 7394
7394 bool get isEmpty { 7395 bool get isEmpty {
7395 return _element.$dom_firstElementChild == null; 7396 return _element.$dom_firstElementChild == null;
7396 } 7397 }
7397 7398
7398 List<Element> take(int n) { 7399 List<Element> take(int n) {
7399 return new ListView<Element>(this, 0, n); 7400 return IterableMixinWorkaround.takeList(this, n);
7400 } 7401 }
7401 7402
7402 Iterable<Element> takeWhile(bool test(Element value)) { 7403 Iterable<Element> takeWhile(bool test(Element value)) {
7403 return new TakeWhileIterable<Element>(this, test); 7404 return IterableMixinWorkaround.takeWhile(this, test);
7404 } 7405 }
7405 7406
7406 List<Element> skip(int n) { 7407 List<Element> skip(int n) {
7407 return new ListView<Element>(this, n, null); 7408 return IterableMixinWorkaround.skipList(this, n);
7408 } 7409 }
7409 7410
7410 Iterable<Element> skipWhile(bool test(Element value)) { 7411 Iterable<Element> skipWhile(bool test(Element value)) {
7411 return new SkipWhileIterable<Element>(this, test); 7412 return IterableMixinWorkaround.skipWhile(this, test);
7412 } 7413 }
7413 7414
7414 Element firstMatching(bool test(Element value), {Element orElse()}) { 7415 Element firstMatching(bool test(Element value), {Element orElse()}) {
7415 return Collections.firstMatching(this, test, orElse); 7416 return IterableMixinWorkaround.firstMatching(this, test, orElse);
7416 } 7417 }
7417 7418
7418 Element lastMatching(bool test(Element value), {Element orElse()}) { 7419 Element lastMatching(bool test(Element value), {Element orElse()}) {
7419 return Collections.lastMatchingInList(this, test, orElse); 7420 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
7420 } 7421 }
7421 7422
7422 Element singleMatching(bool test(Element value)) { 7423 Element singleMatching(bool test(Element value)) {
7423 return Collections.singleMatching(this, test); 7424 return IterableMixinWorkaround.singleMatching(this, test);
7424 } 7425 }
7425 7426
7426 Element elementAt(int index) { 7427 Element elementAt(int index) {
7427 return this[index]; 7428 return this[index];
7428 } 7429 }
7429 7430
7430 int get length { 7431 int get length {
7431 return _childElements.length; 7432 return _childElements.length;
7432 } 7433 }
7433 7434
(...skipping 24 matching lines...) Expand all
7458 _element.$dom_appendChild(element); 7459 _element.$dom_appendChild(element);
7459 } 7460 }
7460 } 7461 }
7461 7462
7462 void sort([int compare(Element a, Element b)]) { 7463 void sort([int compare(Element a, Element b)]) {
7463 throw new UnsupportedError('TODO(jacobr): should we impl?'); 7464 throw new UnsupportedError('TODO(jacobr): should we impl?');
7464 } 7465 }
7465 7466
7466 dynamic reduce(dynamic initialValue, 7467 dynamic reduce(dynamic initialValue,
7467 dynamic combine(dynamic previousValue, Element element)) { 7468 dynamic combine(dynamic previousValue, Element element)) {
7468 return Collections.reduce(this, initialValue, combine); 7469 return IterableMixinWorkaround.reduce(this, initialValue, combine);
7469 } 7470 }
7470 7471
7471 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { 7472 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
7472 throw new UnimplementedError(); 7473 throw new UnimplementedError();
7473 } 7474 }
7474 7475
7475 void removeRange(int start, int rangeLength) { 7476 void removeRange(int start, int rangeLength) {
7476 throw new UnimplementedError(); 7477 throw new UnimplementedError();
7477 } 7478 }
7478 7479
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
7526 if (result == null) throw new StateError("No elements"); 7527 if (result == null) throw new StateError("No elements");
7527 return result; 7528 return result;
7528 } 7529 }
7529 7530
7530 Element get single { 7531 Element get single {
7531 if (length > 1) throw new StateError("More than one element"); 7532 if (length > 1) throw new StateError("More than one element");
7532 return first; 7533 return first;
7533 } 7534 }
7534 7535
7535 Element min([int compare(Element a, Element b)]) { 7536 Element min([int compare(Element a, Element b)]) {
7536 return Collections.min(this, compare); 7537 return IterableMixinWorkaround.min(this, compare);
7537 } 7538 }
7538 7539
7539 Element max([int compare(Element a, Element b)]) { 7540 Element max([int compare(Element a, Element b)]) {
7540 return Collections.max(this, compare); 7541 return IterableMixinWorkaround.max(this, compare);
7541 } 7542 }
7542 } 7543 }
7543 7544
7544 // TODO(jacobr): this is an inefficient implementation but it is hard to see 7545 // TODO(jacobr): this is an inefficient implementation but it is hard to see
7545 // a better option given that we cannot quite force NodeList to be an 7546 // a better option given that we cannot quite force NodeList to be an
7546 // ElementList as there are valid cases where a NodeList JavaScript object 7547 // ElementList as there are valid cases where a NodeList JavaScript object
7547 // contains Node objects that are not Elements. 7548 // contains Node objects that are not Elements.
7548 class _FrozenElementList implements List { 7549 class _FrozenElementList implements List {
7549 final List<Node> _nodeList; 7550 final List<Node> _nodeList;
7550 7551
7551 _FrozenElementList._wrap(this._nodeList); 7552 _FrozenElementList._wrap(this._nodeList);
7552 7553
7553 bool contains(Element element) { 7554 bool contains(Element element) {
7554 for (Element el in this) { 7555 for (Element el in this) {
7555 if (el == element) return true; 7556 if (el == element) return true;
7556 } 7557 }
7557 return false; 7558 return false;
7558 } 7559 }
7559 7560
7560 void forEach(void f(Element element)) { 7561 void forEach(void f(Element element)) {
7561 for (Element el in this) { 7562 for (Element el in this) {
7562 f(el); 7563 f(el);
7563 } 7564 }
7564 } 7565 }
7565 7566
7566 String join([String separator]) { 7567 String join([String separator]) {
7567 return Collections.joinList(this, separator); 7568 return IterableMixinWorkaround.joinList(this, separator);
7568 } 7569 }
7569 7570
7570 List mappedBy(f(Element element)) { 7571 List mappedBy(f(Element element)) {
7571 return new MappedList<Element, dynamic>(this, f); 7572 return IterableMixinWorkaround.mappedByList(this, f);
7572 } 7573 }
7573 7574
7574 Iterable<Element> where(bool f(Element element)) 7575 Iterable<Element> where(bool f(Element element)) {
7575 => new WhereIterable(this, f); 7576 return IterableMixinWorkaround.where(this, f);
7577 }
7576 7578
7577 bool every(bool f(Element element)) { 7579 bool every(bool f(Element element)) {
7578 for(Element element in this) { 7580 for(Element element in this) {
7579 if (!f(element)) { 7581 if (!f(element)) {
7580 return false; 7582 return false;
7581 } 7583 }
7582 }; 7584 };
7583 return true; 7585 return true;
7584 } 7586 }
7585 7587
7586 bool any(bool f(Element element)) { 7588 bool any(bool f(Element element)) {
7587 for(Element element in this) { 7589 for(Element element in this) {
7588 if (f(element)) { 7590 if (f(element)) {
7589 return true; 7591 return true;
7590 } 7592 }
7591 }; 7593 };
7592 return false; 7594 return false;
7593 } 7595 }
7594 7596
7595 List<Element> toList() => new List<Element>.from(this); 7597 List<Element> toList() => new List<Element>.from(this);
7596 Set<Element> toSet() => new Set<Element>.from(this); 7598 Set<Element> toSet() => new Set<Element>.from(this);
7597 7599
7598 List<Element> take(int n) { 7600 List<Element> take(int n) {
7599 return new ListView<Element>(this, 0, n); 7601 return IterableMixinWorkaround.takeList(this, n);
7600 } 7602 }
7601 7603
7602 Iterable<Element> takeWhile(bool test(Element value)) { 7604 Iterable<Element> takeWhile(bool test(Element value)) {
7603 return new TakeWhileIterable<Element>(this, test); 7605 return IterableMixinWorkaround.takeWhile(this, test);
7604 } 7606 }
7605 7607
7606 List<Element> skip(int n) { 7608 List<Element> skip(int n) {
7607 return new ListView<Element>(this, n, null); 7609 return IterableMixinWorkaround.skipList(this, n);
7608 } 7610 }
7609 7611
7610 Iterable<Element> skipWhile(bool test(Element value)) { 7612 Iterable<Element> skipWhile(bool test(Element value)) {
7611 return new SkipWhileIterable<Element>(this, test); 7613 return IterableMixinWorkaround.skipWhile(this, test);
7612 } 7614 }
7613 7615
7614 Element firstMatching(bool test(Element value), {Element orElse()}) { 7616 Element firstMatching(bool test(Element value), {Element orElse()}) {
7615 return Collections.firstMatching(this, test, orElse); 7617 return IterableMixinWorkaround.firstMatching(this, test, orElse);
7616 } 7618 }
7617 7619
7618 Element lastMatching(bool test(Element value), {Element orElse()}) { 7620 Element lastMatching(bool test(Element value), {Element orElse()}) {
7619 return Collections.lastMatchingInList(this, test, orElse); 7621 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
7620 } 7622 }
7621 7623
7622 Element singleMatching(bool test(Element value)) { 7624 Element singleMatching(bool test(Element value)) {
7623 return Collections.singleMatching(this, test); 7625 return IterableMixinWorkaround.singleMatching(this, test);
7624 } 7626 }
7625 7627
7626 Element elementAt(int index) { 7628 Element elementAt(int index) {
7627 return this[index]; 7629 return this[index];
7628 } 7630 }
7629 7631
7630 bool get isEmpty => _nodeList.isEmpty; 7632 bool get isEmpty => _nodeList.isEmpty;
7631 7633
7632 int get length => _nodeList.length; 7634 int get length => _nodeList.length;
7633 7635
(...skipping 20 matching lines...) Expand all
7654 void addAll(Iterable<Element> iterable) { 7656 void addAll(Iterable<Element> iterable) {
7655 throw new UnsupportedError(''); 7657 throw new UnsupportedError('');
7656 } 7658 }
7657 7659
7658 void sort([int compare(Element a, Element b)]) { 7660 void sort([int compare(Element a, Element b)]) {
7659 throw new UnsupportedError(''); 7661 throw new UnsupportedError('');
7660 } 7662 }
7661 7663
7662 dynamic reduce(dynamic initialValue, 7664 dynamic reduce(dynamic initialValue,
7663 dynamic combine(dynamic previousValue, Element element)) { 7665 dynamic combine(dynamic previousValue, Element element)) {
7664 return Collections.reduce(this, initialValue, combine); 7666 return IterableMixinWorkaround.reduce(this, initialValue, combine);
7665 } 7667 }
7666 7668
7667 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { 7669 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
7668 throw new UnsupportedError(''); 7670 throw new UnsupportedError('');
7669 } 7671 }
7670 7672
7671 void removeRange(int start, int rangeLength) { 7673 void removeRange(int start, int rangeLength) {
7672 throw new UnsupportedError(''); 7674 throw new UnsupportedError('');
7673 } 7675 }
7674 7676
(...skipping 22 matching lines...) Expand all
7697 throw new UnsupportedError(''); 7699 throw new UnsupportedError('');
7698 } 7700 }
7699 7701
7700 Element get first => _nodeList.first; 7702 Element get first => _nodeList.first;
7701 7703
7702 Element get last => _nodeList.last; 7704 Element get last => _nodeList.last;
7703 7705
7704 Element get single => _nodeList.single; 7706 Element get single => _nodeList.single;
7705 7707
7706 Element min([int compare(Element a, Element b)]) { 7708 Element min([int compare(Element a, Element b)]) {
7707 return Collections.min(this, compare); 7709 return IterableMixinWorkaround.min(this, compare);
7708 } 7710 }
7709 7711
7710 Element max([int compare(Element a, Element b)]) { 7712 Element max([int compare(Element a, Element b)]) {
7711 return Collections.max(this, compare); 7713 return IterableMixinWorkaround.max(this, compare);
7712 } 7714 }
7713 } 7715 }
7714 7716
7715 class _FrozenElementListIterator implements Iterator<Element> { 7717 class _FrozenElementListIterator implements Iterator<Element> {
7716 final _FrozenElementList _list; 7718 final _FrozenElementList _list;
7717 int _index = -1; 7719 int _index = -1;
7718 Element _current; 7720 Element _current;
7719 7721
7720 _FrozenElementListIterator(this._list); 7722 _FrozenElementListIterator(this._list);
7721 7723
(...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after
9607 // From Iterable<File>: 9609 // From Iterable<File>:
9608 9610
9609 Iterator<File> get iterator { 9611 Iterator<File> get iterator {
9610 // Note: NodeLists are not fixed size. And most probably length shouldn't 9612 // Note: NodeLists are not fixed size. And most probably length shouldn't
9611 // be cached in both iterator _and_ forEach method. For now caching it 9613 // be cached in both iterator _and_ forEach method. For now caching it
9612 // for consistency. 9614 // for consistency.
9613 return new FixedSizeListIterator<File>(this); 9615 return new FixedSizeListIterator<File>(this);
9614 } 9616 }
9615 9617
9616 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, File)) { 9618 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, File)) {
9617 return Collections.reduce(this, initialValue, combine); 9619 return IterableMixinWorkaround.reduce(this, initialValue, combine);
9618 } 9620 }
9619 9621
9620 bool contains(File element) => Collections.contains(this, element); 9622 bool contains(File element) => IterableMixinWorkaround.contains(this, element) ;
9621 9623
9622 void forEach(void f(File element)) => Collections.forEach(this, f); 9624 void forEach(void f(File element)) => IterableMixinWorkaround.forEach(this, f) ;
9623 9625
9624 String join([String separator]) => Collections.joinList(this, separator); 9626 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
9625 9627
9626 List mappedBy(f(File element)) => new MappedList<File, dynamic>(this, f); 9628 List mappedBy(f(File element)) => IterableMixinWorkaround.mappedByList(this, f );
9627 9629
9628 Iterable<File> where(bool f(File element)) => new WhereIterable<File>(this, f) ; 9630 Iterable<File> where(bool f(File element)) => IterableMixinWorkaround.where(th is, f);
9629 9631
9630 bool every(bool f(File element)) => Collections.every(this, f); 9632 bool every(bool f(File element)) => IterableMixinWorkaround.every(this, f);
9631 9633
9632 bool any(bool f(File element)) => Collections.any(this, f); 9634 bool any(bool f(File element)) => IterableMixinWorkaround.any(this, f);
9633 9635
9634 List<File> toList() => new List<File>.from(this); 9636 List<File> toList() => new List<File>.from(this);
9635 Set<File> toSet() => new Set<File>.from(this); 9637 Set<File> toSet() => new Set<File>.from(this);
9636 9638
9637 bool get isEmpty => this.length == 0; 9639 bool get isEmpty => this.length == 0;
9638 9640
9639 List<File> take(int n) => new ListView<File>(this, 0, n); 9641 List<File> take(int n) => IterableMixinWorkaround.takeList(this, n);
9640 9642
9641 Iterable<File> takeWhile(bool test(File value)) { 9643 Iterable<File> takeWhile(bool test(File value)) {
9642 return new TakeWhileIterable<File>(this, test); 9644 return IterableMixinWorkaround.takeWhile(this, test);
9643 } 9645 }
9644 9646
9645 List<File> skip(int n) => new ListView<File>(this, n, null); 9647 List<File> skip(int n) => IterableMixinWorkaround.skipList(this, n);
9646 9648
9647 Iterable<File> skipWhile(bool test(File value)) { 9649 Iterable<File> skipWhile(bool test(File value)) {
9648 return new SkipWhileIterable<File>(this, test); 9650 return IterableMixinWorkaround.skipWhile(this, test);
9649 } 9651 }
9650 9652
9651 File firstMatching(bool test(File value), { File orElse() }) { 9653 File firstMatching(bool test(File value), { File orElse() }) {
9652 return Collections.firstMatching(this, test, orElse); 9654 return IterableMixinWorkaround.firstMatching(this, test, orElse);
9653 } 9655 }
9654 9656
9655 File lastMatching(bool test(File value), {File orElse()}) { 9657 File lastMatching(bool test(File value), {File orElse()}) {
9656 return Collections.lastMatchingInList(this, test, orElse); 9658 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
9657 } 9659 }
9658 9660
9659 File singleMatching(bool test(File value)) { 9661 File singleMatching(bool test(File value)) {
9660 return Collections.singleMatching(this, test); 9662 return IterableMixinWorkaround.singleMatching(this, test);
9661 } 9663 }
9662 9664
9663 File elementAt(int index) { 9665 File elementAt(int index) {
9664 return this[index]; 9666 return this[index];
9665 } 9667 }
9666 9668
9667 // From Collection<File>: 9669 // From Collection<File>:
9668 9670
9669 void add(File value) { 9671 void add(File value) {
9670 throw new UnsupportedError("Cannot add to immutable List."); 9672 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
9708 if (this.length > 0) return this[this.length - 1]; 9710 if (this.length > 0) return this[this.length - 1];
9709 throw new StateError("No elements"); 9711 throw new StateError("No elements");
9710 } 9712 }
9711 9713
9712 File get single { 9714 File get single {
9713 if (length == 1) return this[0]; 9715 if (length == 1) return this[0];
9714 if (length == 0) throw new StateError("No elements"); 9716 if (length == 0) throw new StateError("No elements");
9715 throw new StateError("More than one element"); 9717 throw new StateError("More than one element");
9716 } 9718 }
9717 9719
9718 File min([int compare(File a, File b)]) => Collections.min(this, compare); 9720 File min([int compare(File a, File b)]) => IterableMixinWorkaround.min(this, c ompare);
9719 9721
9720 File max([int compare(File a, File b)]) => Collections.max(this, compare); 9722 File max([int compare(File a, File b)]) => IterableMixinWorkaround.max(this, c ompare);
9721 9723
9722 File removeAt(int pos) { 9724 File removeAt(int pos) {
9723 throw new UnsupportedError("Cannot removeAt on immutable List."); 9725 throw new UnsupportedError("Cannot removeAt on immutable List.");
9724 } 9726 }
9725 9727
9726 File removeLast() { 9728 File removeLast() {
9727 throw new UnsupportedError("Cannot removeLast on immutable List."); 9729 throw new UnsupportedError("Cannot removeLast on immutable List.");
9728 } 9730 }
9729 9731
9730 void setRange(int start, int rangeLength, List<File> from, [int startFrom]) { 9732 void setRange(int start, int rangeLength, List<File> from, [int startFrom]) {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
10097 // From Iterable<num>: 10099 // From Iterable<num>:
10098 10100
10099 Iterator<num> get iterator { 10101 Iterator<num> get iterator {
10100 // Note: NodeLists are not fixed size. And most probably length shouldn't 10102 // Note: NodeLists are not fixed size. And most probably length shouldn't
10101 // be cached in both iterator _and_ forEach method. For now caching it 10103 // be cached in both iterator _and_ forEach method. For now caching it
10102 // for consistency. 10104 // for consistency.
10103 return new FixedSizeListIterator<num>(this); 10105 return new FixedSizeListIterator<num>(this);
10104 } 10106 }
10105 10107
10106 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, num)) { 10108 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, num)) {
10107 return Collections.reduce(this, initialValue, combine); 10109 return IterableMixinWorkaround.reduce(this, initialValue, combine);
10108 } 10110 }
10109 10111
10110 bool contains(num element) => Collections.contains(this, element); 10112 bool contains(num element) => IterableMixinWorkaround.contains(this, element);
10111 10113
10112 void forEach(void f(num element)) => Collections.forEach(this, f); 10114 void forEach(void f(num element)) => IterableMixinWorkaround.forEach(this, f);
10113 10115
10114 String join([String separator]) => Collections.joinList(this, separator); 10116 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
10115 10117
10116 List mappedBy(f(num element)) => new MappedList<num, dynamic>(this, f); 10118 List mappedBy(f(num element)) => IterableMixinWorkaround.mappedByList(this, f) ;
10117 10119
10118 Iterable<num> where(bool f(num element)) => new WhereIterable<num>(this, f); 10120 Iterable<num> where(bool f(num element)) => IterableMixinWorkaround.where(this , f);
10119 10121
10120 bool every(bool f(num element)) => Collections.every(this, f); 10122 bool every(bool f(num element)) => IterableMixinWorkaround.every(this, f);
10121 10123
10122 bool any(bool f(num element)) => Collections.any(this, f); 10124 bool any(bool f(num element)) => IterableMixinWorkaround.any(this, f);
10123 10125
10124 List<num> toList() => new List<num>.from(this); 10126 List<num> toList() => new List<num>.from(this);
10125 Set<num> toSet() => new Set<num>.from(this); 10127 Set<num> toSet() => new Set<num>.from(this);
10126 10128
10127 bool get isEmpty => this.length == 0; 10129 bool get isEmpty => this.length == 0;
10128 10130
10129 List<num> take(int n) => new ListView<num>(this, 0, n); 10131 List<num> take(int n) => IterableMixinWorkaround.takeList(this, n);
10130 10132
10131 Iterable<num> takeWhile(bool test(num value)) { 10133 Iterable<num> takeWhile(bool test(num value)) {
10132 return new TakeWhileIterable<num>(this, test); 10134 return IterableMixinWorkaround.takeWhile(this, test);
10133 } 10135 }
10134 10136
10135 List<num> skip(int n) => new ListView<num>(this, n, null); 10137 List<num> skip(int n) => IterableMixinWorkaround.skipList(this, n);
10136 10138
10137 Iterable<num> skipWhile(bool test(num value)) { 10139 Iterable<num> skipWhile(bool test(num value)) {
10138 return new SkipWhileIterable<num>(this, test); 10140 return IterableMixinWorkaround.skipWhile(this, test);
10139 } 10141 }
10140 10142
10141 num firstMatching(bool test(num value), { num orElse() }) { 10143 num firstMatching(bool test(num value), { num orElse() }) {
10142 return Collections.firstMatching(this, test, orElse); 10144 return IterableMixinWorkaround.firstMatching(this, test, orElse);
10143 } 10145 }
10144 10146
10145 num lastMatching(bool test(num value), {num orElse()}) { 10147 num lastMatching(bool test(num value), {num orElse()}) {
10146 return Collections.lastMatchingInList(this, test, orElse); 10148 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
10147 } 10149 }
10148 10150
10149 num singleMatching(bool test(num value)) { 10151 num singleMatching(bool test(num value)) {
10150 return Collections.singleMatching(this, test); 10152 return IterableMixinWorkaround.singleMatching(this, test);
10151 } 10153 }
10152 10154
10153 num elementAt(int index) { 10155 num elementAt(int index) {
10154 return this[index]; 10156 return this[index];
10155 } 10157 }
10156 10158
10157 // From Collection<num>: 10159 // From Collection<num>:
10158 10160
10159 void add(num value) { 10161 void add(num value) {
10160 throw new UnsupportedError("Cannot add to immutable List."); 10162 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
10198 if (this.length > 0) return this[this.length - 1]; 10200 if (this.length > 0) return this[this.length - 1];
10199 throw new StateError("No elements"); 10201 throw new StateError("No elements");
10200 } 10202 }
10201 10203
10202 num get single { 10204 num get single {
10203 if (length == 1) return this[0]; 10205 if (length == 1) return this[0];
10204 if (length == 0) throw new StateError("No elements"); 10206 if (length == 0) throw new StateError("No elements");
10205 throw new StateError("More than one element"); 10207 throw new StateError("More than one element");
10206 } 10208 }
10207 10209
10208 num min([int compare(num a, num b)]) => Collections.min(this, compare); 10210 num min([int compare(num a, num b)]) => IterableMixinWorkaround.min(this, comp are);
10209 10211
10210 num max([int compare(num a, num b)]) => Collections.max(this, compare); 10212 num max([int compare(num a, num b)]) => IterableMixinWorkaround.max(this, comp are);
10211 10213
10212 num removeAt(int pos) { 10214 num removeAt(int pos) {
10213 throw new UnsupportedError("Cannot removeAt on immutable List."); 10215 throw new UnsupportedError("Cannot removeAt on immutable List.");
10214 } 10216 }
10215 10217
10216 num removeLast() { 10218 num removeLast() {
10217 throw new UnsupportedError("Cannot removeLast on immutable List."); 10219 throw new UnsupportedError("Cannot removeLast on immutable List.");
10218 } 10220 }
10219 10221
10220 void setRange(int start, int rangeLength, List<num> from, [int startFrom]) { 10222 void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
10273 // From Iterable<num>: 10275 // From Iterable<num>:
10274 10276
10275 Iterator<num> get iterator { 10277 Iterator<num> get iterator {
10276 // Note: NodeLists are not fixed size. And most probably length shouldn't 10278 // Note: NodeLists are not fixed size. And most probably length shouldn't
10277 // be cached in both iterator _and_ forEach method. For now caching it 10279 // be cached in both iterator _and_ forEach method. For now caching it
10278 // for consistency. 10280 // for consistency.
10279 return new FixedSizeListIterator<num>(this); 10281 return new FixedSizeListIterator<num>(this);
10280 } 10282 }
10281 10283
10282 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, num)) { 10284 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, num)) {
10283 return Collections.reduce(this, initialValue, combine); 10285 return IterableMixinWorkaround.reduce(this, initialValue, combine);
10284 } 10286 }
10285 10287
10286 bool contains(num element) => Collections.contains(this, element); 10288 bool contains(num element) => IterableMixinWorkaround.contains(this, element);
10287 10289
10288 void forEach(void f(num element)) => Collections.forEach(this, f); 10290 void forEach(void f(num element)) => IterableMixinWorkaround.forEach(this, f);
10289 10291
10290 String join([String separator]) => Collections.joinList(this, separator); 10292 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
10291 10293
10292 List mappedBy(f(num element)) => new MappedList<num, dynamic>(this, f); 10294 List mappedBy(f(num element)) => IterableMixinWorkaround.mappedByList(this, f) ;
10293 10295
10294 Iterable<num> where(bool f(num element)) => new WhereIterable<num>(this, f); 10296 Iterable<num> where(bool f(num element)) => IterableMixinWorkaround.where(this , f);
10295 10297
10296 bool every(bool f(num element)) => Collections.every(this, f); 10298 bool every(bool f(num element)) => IterableMixinWorkaround.every(this, f);
10297 10299
10298 bool any(bool f(num element)) => Collections.any(this, f); 10300 bool any(bool f(num element)) => IterableMixinWorkaround.any(this, f);
10299 10301
10300 List<num> toList() => new List<num>.from(this); 10302 List<num> toList() => new List<num>.from(this);
10301 Set<num> toSet() => new Set<num>.from(this); 10303 Set<num> toSet() => new Set<num>.from(this);
10302 10304
10303 bool get isEmpty => this.length == 0; 10305 bool get isEmpty => this.length == 0;
10304 10306
10305 List<num> take(int n) => new ListView<num>(this, 0, n); 10307 List<num> take(int n) => IterableMixinWorkaround.takeList(this, n);
10306 10308
10307 Iterable<num> takeWhile(bool test(num value)) { 10309 Iterable<num> takeWhile(bool test(num value)) {
10308 return new TakeWhileIterable<num>(this, test); 10310 return IterableMixinWorkaround.takeWhile(this, test);
10309 } 10311 }
10310 10312
10311 List<num> skip(int n) => new ListView<num>(this, n, null); 10313 List<num> skip(int n) => IterableMixinWorkaround.skipList(this, n);
10312 10314
10313 Iterable<num> skipWhile(bool test(num value)) { 10315 Iterable<num> skipWhile(bool test(num value)) {
10314 return new SkipWhileIterable<num>(this, test); 10316 return IterableMixinWorkaround.skipWhile(this, test);
10315 } 10317 }
10316 10318
10317 num firstMatching(bool test(num value), { num orElse() }) { 10319 num firstMatching(bool test(num value), { num orElse() }) {
10318 return Collections.firstMatching(this, test, orElse); 10320 return IterableMixinWorkaround.firstMatching(this, test, orElse);
10319 } 10321 }
10320 10322
10321 num lastMatching(bool test(num value), {num orElse()}) { 10323 num lastMatching(bool test(num value), {num orElse()}) {
10322 return Collections.lastMatchingInList(this, test, orElse); 10324 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
10323 } 10325 }
10324 10326
10325 num singleMatching(bool test(num value)) { 10327 num singleMatching(bool test(num value)) {
10326 return Collections.singleMatching(this, test); 10328 return IterableMixinWorkaround.singleMatching(this, test);
10327 } 10329 }
10328 10330
10329 num elementAt(int index) { 10331 num elementAt(int index) {
10330 return this[index]; 10332 return this[index];
10331 } 10333 }
10332 10334
10333 // From Collection<num>: 10335 // From Collection<num>:
10334 10336
10335 void add(num value) { 10337 void add(num value) {
10336 throw new UnsupportedError("Cannot add to immutable List."); 10338 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
10374 if (this.length > 0) return this[this.length - 1]; 10376 if (this.length > 0) return this[this.length - 1];
10375 throw new StateError("No elements"); 10377 throw new StateError("No elements");
10376 } 10378 }
10377 10379
10378 num get single { 10380 num get single {
10379 if (length == 1) return this[0]; 10381 if (length == 1) return this[0];
10380 if (length == 0) throw new StateError("No elements"); 10382 if (length == 0) throw new StateError("No elements");
10381 throw new StateError("More than one element"); 10383 throw new StateError("More than one element");
10382 } 10384 }
10383 10385
10384 num min([int compare(num a, num b)]) => Collections.min(this, compare); 10386 num min([int compare(num a, num b)]) => IterableMixinWorkaround.min(this, comp are);
10385 10387
10386 num max([int compare(num a, num b)]) => Collections.max(this, compare); 10388 num max([int compare(num a, num b)]) => IterableMixinWorkaround.max(this, comp are);
10387 10389
10388 num removeAt(int pos) { 10390 num removeAt(int pos) {
10389 throw new UnsupportedError("Cannot removeAt on immutable List."); 10391 throw new UnsupportedError("Cannot removeAt on immutable List.");
10390 } 10392 }
10391 10393
10392 num removeLast() { 10394 num removeLast() {
10393 throw new UnsupportedError("Cannot removeLast on immutable List."); 10395 throw new UnsupportedError("Cannot removeLast on immutable List.");
10394 } 10396 }
10395 10397
10396 void setRange(int start, int rangeLength, List<num> from, [int startFrom]) { 10398 void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
10699 // From Iterable<Node>: 10701 // From Iterable<Node>:
10700 10702
10701 Iterator<Node> get iterator { 10703 Iterator<Node> get iterator {
10702 // Note: NodeLists are not fixed size. And most probably length shouldn't 10704 // Note: NodeLists are not fixed size. And most probably length shouldn't
10703 // be cached in both iterator _and_ forEach method. For now caching it 10705 // be cached in both iterator _and_ forEach method. For now caching it
10704 // for consistency. 10706 // for consistency.
10705 return new FixedSizeListIterator<Node>(this); 10707 return new FixedSizeListIterator<Node>(this);
10706 } 10708 }
10707 10709
10708 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) { 10710 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
10709 return Collections.reduce(this, initialValue, combine); 10711 return IterableMixinWorkaround.reduce(this, initialValue, combine);
10710 } 10712 }
10711 10713
10712 bool contains(Node element) => Collections.contains(this, element); 10714 bool contains(Node element) => IterableMixinWorkaround.contains(this, element) ;
10713 10715
10714 void forEach(void f(Node element)) => Collections.forEach(this, f); 10716 void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f) ;
10715 10717
10716 String join([String separator]) => Collections.joinList(this, separator); 10718 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
10717 10719
10718 List mappedBy(f(Node element)) => new MappedList<Node, dynamic>(this, f); 10720 List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f );
10719 10721
10720 Iterable<Node> where(bool f(Node element)) => new WhereIterable<Node>(this, f) ; 10722 Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(th is, f);
10721 10723
10722 bool every(bool f(Node element)) => Collections.every(this, f); 10724 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
10723 10725
10724 bool any(bool f(Node element)) => Collections.any(this, f); 10726 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
10725 10727
10726 List<Node> toList() => new List<Node>.from(this); 10728 List<Node> toList() => new List<Node>.from(this);
10727 Set<Node> toSet() => new Set<Node>.from(this); 10729 Set<Node> toSet() => new Set<Node>.from(this);
10728 10730
10729 bool get isEmpty => this.length == 0; 10731 bool get isEmpty => this.length == 0;
10730 10732
10731 List<Node> take(int n) => new ListView<Node>(this, 0, n); 10733 List<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
10732 10734
10733 Iterable<Node> takeWhile(bool test(Node value)) { 10735 Iterable<Node> takeWhile(bool test(Node value)) {
10734 return new TakeWhileIterable<Node>(this, test); 10736 return IterableMixinWorkaround.takeWhile(this, test);
10735 } 10737 }
10736 10738
10737 List<Node> skip(int n) => new ListView<Node>(this, n, null); 10739 List<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
10738 10740
10739 Iterable<Node> skipWhile(bool test(Node value)) { 10741 Iterable<Node> skipWhile(bool test(Node value)) {
10740 return new SkipWhileIterable<Node>(this, test); 10742 return IterableMixinWorkaround.skipWhile(this, test);
10741 } 10743 }
10742 10744
10743 Node firstMatching(bool test(Node value), { Node orElse() }) { 10745 Node firstMatching(bool test(Node value), { Node orElse() }) {
10744 return Collections.firstMatching(this, test, orElse); 10746 return IterableMixinWorkaround.firstMatching(this, test, orElse);
10745 } 10747 }
10746 10748
10747 Node lastMatching(bool test(Node value), {Node orElse()}) { 10749 Node lastMatching(bool test(Node value), {Node orElse()}) {
10748 return Collections.lastMatchingInList(this, test, orElse); 10750 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
10749 } 10751 }
10750 10752
10751 Node singleMatching(bool test(Node value)) { 10753 Node singleMatching(bool test(Node value)) {
10752 return Collections.singleMatching(this, test); 10754 return IterableMixinWorkaround.singleMatching(this, test);
10753 } 10755 }
10754 10756
10755 Node elementAt(int index) { 10757 Node elementAt(int index) {
10756 return this[index]; 10758 return this[index];
10757 } 10759 }
10758 10760
10759 // From Collection<Node>: 10761 // From Collection<Node>:
10760 10762
10761 void add(Node value) { 10763 void add(Node value) {
10762 throw new UnsupportedError("Cannot add to immutable List."); 10764 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
10800 if (this.length > 0) return this[this.length - 1]; 10802 if (this.length > 0) return this[this.length - 1];
10801 throw new StateError("No elements"); 10803 throw new StateError("No elements");
10802 } 10804 }
10803 10805
10804 Node get single { 10806 Node get single {
10805 if (length == 1) return this[0]; 10807 if (length == 1) return this[0];
10806 if (length == 0) throw new StateError("No elements"); 10808 if (length == 0) throw new StateError("No elements");
10807 throw new StateError("More than one element"); 10809 throw new StateError("More than one element");
10808 } 10810 }
10809 10811
10810 Node min([int compare(Node a, Node b)]) => Collections.min(this, compare); 10812 Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, c ompare);
10811 10813
10812 Node max([int compare(Node a, Node b)]) => Collections.max(this, compare); 10814 Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, c ompare);
10813 10815
10814 Node removeAt(int pos) { 10816 Node removeAt(int pos) {
10815 throw new UnsupportedError("Cannot removeAt on immutable List."); 10817 throw new UnsupportedError("Cannot removeAt on immutable List.");
10816 } 10818 }
10817 10819
10818 Node removeLast() { 10820 Node removeLast() {
10819 throw new UnsupportedError("Cannot removeLast on immutable List."); 10821 throw new UnsupportedError("Cannot removeLast on immutable List.");
10820 } 10822 }
10821 10823
10822 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) { 10824 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
10870 // From Iterable<Node>: 10872 // From Iterable<Node>:
10871 10873
10872 Iterator<Node> get iterator { 10874 Iterator<Node> get iterator {
10873 // Note: NodeLists are not fixed size. And most probably length shouldn't 10875 // Note: NodeLists are not fixed size. And most probably length shouldn't
10874 // be cached in both iterator _and_ forEach method. For now caching it 10876 // be cached in both iterator _and_ forEach method. For now caching it
10875 // for consistency. 10877 // for consistency.
10876 return new FixedSizeListIterator<Node>(this); 10878 return new FixedSizeListIterator<Node>(this);
10877 } 10879 }
10878 10880
10879 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) { 10881 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
10880 return Collections.reduce(this, initialValue, combine); 10882 return IterableMixinWorkaround.reduce(this, initialValue, combine);
10881 } 10883 }
10882 10884
10883 bool contains(Node element) => Collections.contains(this, element); 10885 bool contains(Node element) => IterableMixinWorkaround.contains(this, element) ;
10884 10886
10885 void forEach(void f(Node element)) => Collections.forEach(this, f); 10887 void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f) ;
10886 10888
10887 String join([String separator]) => Collections.joinList(this, separator); 10889 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
10888 10890
10889 List mappedBy(f(Node element)) => new MappedList<Node, dynamic>(this, f); 10891 List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f );
10890 10892
10891 Iterable<Node> where(bool f(Node element)) => new WhereIterable<Node>(this, f) ; 10893 Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(th is, f);
10892 10894
10893 bool every(bool f(Node element)) => Collections.every(this, f); 10895 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
10894 10896
10895 bool any(bool f(Node element)) => Collections.any(this, f); 10897 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
10896 10898
10897 List<Node> toList() => new List<Node>.from(this); 10899 List<Node> toList() => new List<Node>.from(this);
10898 Set<Node> toSet() => new Set<Node>.from(this); 10900 Set<Node> toSet() => new Set<Node>.from(this);
10899 10901
10900 bool get isEmpty => this.length == 0; 10902 bool get isEmpty => this.length == 0;
10901 10903
10902 List<Node> take(int n) => new ListView<Node>(this, 0, n); 10904 List<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
10903 10905
10904 Iterable<Node> takeWhile(bool test(Node value)) { 10906 Iterable<Node> takeWhile(bool test(Node value)) {
10905 return new TakeWhileIterable<Node>(this, test); 10907 return IterableMixinWorkaround.takeWhile(this, test);
10906 } 10908 }
10907 10909
10908 List<Node> skip(int n) => new ListView<Node>(this, n, null); 10910 List<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
10909 10911
10910 Iterable<Node> skipWhile(bool test(Node value)) { 10912 Iterable<Node> skipWhile(bool test(Node value)) {
10911 return new SkipWhileIterable<Node>(this, test); 10913 return IterableMixinWorkaround.skipWhile(this, test);
10912 } 10914 }
10913 10915
10914 Node firstMatching(bool test(Node value), { Node orElse() }) { 10916 Node firstMatching(bool test(Node value), { Node orElse() }) {
10915 return Collections.firstMatching(this, test, orElse); 10917 return IterableMixinWorkaround.firstMatching(this, test, orElse);
10916 } 10918 }
10917 10919
10918 Node lastMatching(bool test(Node value), {Node orElse()}) { 10920 Node lastMatching(bool test(Node value), {Node orElse()}) {
10919 return Collections.lastMatchingInList(this, test, orElse); 10921 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
10920 } 10922 }
10921 10923
10922 Node singleMatching(bool test(Node value)) { 10924 Node singleMatching(bool test(Node value)) {
10923 return Collections.singleMatching(this, test); 10925 return IterableMixinWorkaround.singleMatching(this, test);
10924 } 10926 }
10925 10927
10926 Node elementAt(int index) { 10928 Node elementAt(int index) {
10927 return this[index]; 10929 return this[index];
10928 } 10930 }
10929 10931
10930 // From Collection<Node>: 10932 // From Collection<Node>:
10931 10933
10932 void add(Node value) { 10934 void add(Node value) {
10933 throw new UnsupportedError("Cannot add to immutable List."); 10935 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
10971 if (this.length > 0) return this[this.length - 1]; 10973 if (this.length > 0) return this[this.length - 1];
10972 throw new StateError("No elements"); 10974 throw new StateError("No elements");
10973 } 10975 }
10974 10976
10975 Node get single { 10977 Node get single {
10976 if (length == 1) return this[0]; 10978 if (length == 1) return this[0];
10977 if (length == 0) throw new StateError("No elements"); 10979 if (length == 0) throw new StateError("No elements");
10978 throw new StateError("More than one element"); 10980 throw new StateError("More than one element");
10979 } 10981 }
10980 10982
10981 Node min([int compare(Node a, Node b)]) => Collections.min(this, compare); 10983 Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, c ompare);
10982 10984
10983 Node max([int compare(Node a, Node b)]) => Collections.max(this, compare); 10985 Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, c ompare);
10984 10986
10985 Node removeAt(int pos) { 10987 Node removeAt(int pos) {
10986 throw new UnsupportedError("Cannot removeAt on immutable List."); 10988 throw new UnsupportedError("Cannot removeAt on immutable List.");
10987 } 10989 }
10988 10990
10989 Node removeLast() { 10991 Node removeLast() {
10990 throw new UnsupportedError("Cannot removeLast on immutable List."); 10992 throw new UnsupportedError("Cannot removeLast on immutable List.");
10991 } 10993 }
10992 10994
10993 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) { 10995 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after
12464 // From Iterable<int>: 12466 // From Iterable<int>:
12465 12467
12466 Iterator<int> get iterator { 12468 Iterator<int> get iterator {
12467 // Note: NodeLists are not fixed size. And most probably length shouldn't 12469 // Note: NodeLists are not fixed size. And most probably length shouldn't
12468 // be cached in both iterator _and_ forEach method. For now caching it 12470 // be cached in both iterator _and_ forEach method. For now caching it
12469 // for consistency. 12471 // for consistency.
12470 return new FixedSizeListIterator<int>(this); 12472 return new FixedSizeListIterator<int>(this);
12471 } 12473 }
12472 12474
12473 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) { 12475 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
12474 return Collections.reduce(this, initialValue, combine); 12476 return IterableMixinWorkaround.reduce(this, initialValue, combine);
12475 } 12477 }
12476 12478
12477 bool contains(int element) => Collections.contains(this, element); 12479 bool contains(int element) => IterableMixinWorkaround.contains(this, element);
12478 12480
12479 void forEach(void f(int element)) => Collections.forEach(this, f); 12481 void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
12480 12482
12481 String join([String separator]) => Collections.joinList(this, separator); 12483 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
12482 12484
12483 List mappedBy(f(int element)) => new MappedList<int, dynamic>(this, f); 12485 List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f) ;
12484 12486
12485 Iterable<int> where(bool f(int element)) => new WhereIterable<int>(this, f); 12487 Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this , f);
12486 12488
12487 bool every(bool f(int element)) => Collections.every(this, f); 12489 bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
12488 12490
12489 bool any(bool f(int element)) => Collections.any(this, f); 12491 bool any(bool f(int element)) => IterableMixinWorkaround.any(this, f);
12490 12492
12491 List<int> toList() => new List<int>.from(this); 12493 List<int> toList() => new List<int>.from(this);
12492 Set<int> toSet() => new Set<int>.from(this); 12494 Set<int> toSet() => new Set<int>.from(this);
12493 12495
12494 bool get isEmpty => this.length == 0; 12496 bool get isEmpty => this.length == 0;
12495 12497
12496 List<int> take(int n) => new ListView<int>(this, 0, n); 12498 List<int> take(int n) => IterableMixinWorkaround.takeList(this, n);
12497 12499
12498 Iterable<int> takeWhile(bool test(int value)) { 12500 Iterable<int> takeWhile(bool test(int value)) {
12499 return new TakeWhileIterable<int>(this, test); 12501 return IterableMixinWorkaround.takeWhile(this, test);
12500 } 12502 }
12501 12503
12502 List<int> skip(int n) => new ListView<int>(this, n, null); 12504 List<int> skip(int n) => IterableMixinWorkaround.skipList(this, n);
12503 12505
12504 Iterable<int> skipWhile(bool test(int value)) { 12506 Iterable<int> skipWhile(bool test(int value)) {
12505 return new SkipWhileIterable<int>(this, test); 12507 return IterableMixinWorkaround.skipWhile(this, test);
12506 } 12508 }
12507 12509
12508 int firstMatching(bool test(int value), { int orElse() }) { 12510 int firstMatching(bool test(int value), { int orElse() }) {
12509 return Collections.firstMatching(this, test, orElse); 12511 return IterableMixinWorkaround.firstMatching(this, test, orElse);
12510 } 12512 }
12511 12513
12512 int lastMatching(bool test(int value), {int orElse()}) { 12514 int lastMatching(bool test(int value), {int orElse()}) {
12513 return Collections.lastMatchingInList(this, test, orElse); 12515 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
12514 } 12516 }
12515 12517
12516 int singleMatching(bool test(int value)) { 12518 int singleMatching(bool test(int value)) {
12517 return Collections.singleMatching(this, test); 12519 return IterableMixinWorkaround.singleMatching(this, test);
12518 } 12520 }
12519 12521
12520 int elementAt(int index) { 12522 int elementAt(int index) {
12521 return this[index]; 12523 return this[index];
12522 } 12524 }
12523 12525
12524 // From Collection<int>: 12526 // From Collection<int>:
12525 12527
12526 void add(int value) { 12528 void add(int value) {
12527 throw new UnsupportedError("Cannot add to immutable List."); 12529 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
12565 if (this.length > 0) return this[this.length - 1]; 12567 if (this.length > 0) return this[this.length - 1];
12566 throw new StateError("No elements"); 12568 throw new StateError("No elements");
12567 } 12569 }
12568 12570
12569 int get single { 12571 int get single {
12570 if (length == 1) return this[0]; 12572 if (length == 1) return this[0];
12571 if (length == 0) throw new StateError("No elements"); 12573 if (length == 0) throw new StateError("No elements");
12572 throw new StateError("More than one element"); 12574 throw new StateError("More than one element");
12573 } 12575 }
12574 12576
12575 int min([int compare(int a, int b)]) => Collections.min(this, compare); 12577 int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, comp are);
12576 12578
12577 int max([int compare(int a, int b)]) => Collections.max(this, compare); 12579 int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, comp are);
12578 12580
12579 int removeAt(int pos) { 12581 int removeAt(int pos) {
12580 throw new UnsupportedError("Cannot removeAt on immutable List."); 12582 throw new UnsupportedError("Cannot removeAt on immutable List.");
12581 } 12583 }
12582 12584
12583 int removeLast() { 12585 int removeLast() {
12584 throw new UnsupportedError("Cannot removeLast on immutable List."); 12586 throw new UnsupportedError("Cannot removeLast on immutable List.");
12585 } 12587 }
12586 12588
12587 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { 12589 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
12640 // From Iterable<int>: 12642 // From Iterable<int>:
12641 12643
12642 Iterator<int> get iterator { 12644 Iterator<int> get iterator {
12643 // Note: NodeLists are not fixed size. And most probably length shouldn't 12645 // Note: NodeLists are not fixed size. And most probably length shouldn't
12644 // be cached in both iterator _and_ forEach method. For now caching it 12646 // be cached in both iterator _and_ forEach method. For now caching it
12645 // for consistency. 12647 // for consistency.
12646 return new FixedSizeListIterator<int>(this); 12648 return new FixedSizeListIterator<int>(this);
12647 } 12649 }
12648 12650
12649 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) { 12651 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
12650 return Collections.reduce(this, initialValue, combine); 12652 return IterableMixinWorkaround.reduce(this, initialValue, combine);
12651 } 12653 }
12652 12654
12653 bool contains(int element) => Collections.contains(this, element); 12655 bool contains(int element) => IterableMixinWorkaround.contains(this, element);
12654 12656
12655 void forEach(void f(int element)) => Collections.forEach(this, f); 12657 void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
12656 12658
12657 String join([String separator]) => Collections.joinList(this, separator); 12659 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
12658 12660
12659 List mappedBy(f(int element)) => new MappedList<int, dynamic>(this, f); 12661 List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f) ;
12660 12662
12661 Iterable<int> where(bool f(int element)) => new WhereIterable<int>(this, f); 12663 Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this , f);
12662 12664
12663 bool every(bool f(int element)) => Collections.every(this, f); 12665 bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
12664 12666
12665 bool any(bool f(int element)) => Collections.any(this, f); 12667 bool any(bool f(int element)) => IterableMixinWorkaround.any(this, f);
12666 12668
12667 List<int> toList() => new List<int>.from(this); 12669 List<int> toList() => new List<int>.from(this);
12668 Set<int> toSet() => new Set<int>.from(this); 12670 Set<int> toSet() => new Set<int>.from(this);
12669 12671
12670 bool get isEmpty => this.length == 0; 12672 bool get isEmpty => this.length == 0;
12671 12673
12672 List<int> take(int n) => new ListView<int>(this, 0, n); 12674 List<int> take(int n) => IterableMixinWorkaround.takeList(this, n);
12673 12675
12674 Iterable<int> takeWhile(bool test(int value)) { 12676 Iterable<int> takeWhile(bool test(int value)) {
12675 return new TakeWhileIterable<int>(this, test); 12677 return IterableMixinWorkaround.takeWhile(this, test);
12676 } 12678 }
12677 12679
12678 List<int> skip(int n) => new ListView<int>(this, n, null); 12680 List<int> skip(int n) => IterableMixinWorkaround.skipList(this, n);
12679 12681
12680 Iterable<int> skipWhile(bool test(int value)) { 12682 Iterable<int> skipWhile(bool test(int value)) {
12681 return new SkipWhileIterable<int>(this, test); 12683 return IterableMixinWorkaround.skipWhile(this, test);
12682 } 12684 }
12683 12685
12684 int firstMatching(bool test(int value), { int orElse() }) { 12686 int firstMatching(bool test(int value), { int orElse() }) {
12685 return Collections.firstMatching(this, test, orElse); 12687 return IterableMixinWorkaround.firstMatching(this, test, orElse);
12686 } 12688 }
12687 12689
12688 int lastMatching(bool test(int value), {int orElse()}) { 12690 int lastMatching(bool test(int value), {int orElse()}) {
12689 return Collections.lastMatchingInList(this, test, orElse); 12691 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
12690 } 12692 }
12691 12693
12692 int singleMatching(bool test(int value)) { 12694 int singleMatching(bool test(int value)) {
12693 return Collections.singleMatching(this, test); 12695 return IterableMixinWorkaround.singleMatching(this, test);
12694 } 12696 }
12695 12697
12696 int elementAt(int index) { 12698 int elementAt(int index) {
12697 return this[index]; 12699 return this[index];
12698 } 12700 }
12699 12701
12700 // From Collection<int>: 12702 // From Collection<int>:
12701 12703
12702 void add(int value) { 12704 void add(int value) {
12703 throw new UnsupportedError("Cannot add to immutable List."); 12705 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
12741 if (this.length > 0) return this[this.length - 1]; 12743 if (this.length > 0) return this[this.length - 1];
12742 throw new StateError("No elements"); 12744 throw new StateError("No elements");
12743 } 12745 }
12744 12746
12745 int get single { 12747 int get single {
12746 if (length == 1) return this[0]; 12748 if (length == 1) return this[0];
12747 if (length == 0) throw new StateError("No elements"); 12749 if (length == 0) throw new StateError("No elements");
12748 throw new StateError("More than one element"); 12750 throw new StateError("More than one element");
12749 } 12751 }
12750 12752
12751 int min([int compare(int a, int b)]) => Collections.min(this, compare); 12753 int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, comp are);
12752 12754
12753 int max([int compare(int a, int b)]) => Collections.max(this, compare); 12755 int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, comp are);
12754 12756
12755 int removeAt(int pos) { 12757 int removeAt(int pos) {
12756 throw new UnsupportedError("Cannot removeAt on immutable List."); 12758 throw new UnsupportedError("Cannot removeAt on immutable List.");
12757 } 12759 }
12758 12760
12759 int removeLast() { 12761 int removeLast() {
12760 throw new UnsupportedError("Cannot removeLast on immutable List."); 12762 throw new UnsupportedError("Cannot removeLast on immutable List.");
12761 } 12763 }
12762 12764
12763 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { 12765 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
12816 // From Iterable<int>: 12818 // From Iterable<int>:
12817 12819
12818 Iterator<int> get iterator { 12820 Iterator<int> get iterator {
12819 // Note: NodeLists are not fixed size. And most probably length shouldn't 12821 // Note: NodeLists are not fixed size. And most probably length shouldn't
12820 // be cached in both iterator _and_ forEach method. For now caching it 12822 // be cached in both iterator _and_ forEach method. For now caching it
12821 // for consistency. 12823 // for consistency.
12822 return new FixedSizeListIterator<int>(this); 12824 return new FixedSizeListIterator<int>(this);
12823 } 12825 }
12824 12826
12825 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) { 12827 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
12826 return Collections.reduce(this, initialValue, combine); 12828 return IterableMixinWorkaround.reduce(this, initialValue, combine);
12827 } 12829 }
12828 12830
12829 bool contains(int element) => Collections.contains(this, element); 12831 bool contains(int element) => IterableMixinWorkaround.contains(this, element);
12830 12832
12831 void forEach(void f(int element)) => Collections.forEach(this, f); 12833 void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
12832 12834
12833 String join([String separator]) => Collections.joinList(this, separator); 12835 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
12834 12836
12835 List mappedBy(f(int element)) => new MappedList<int, dynamic>(this, f); 12837 List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f) ;
12836 12838
12837 Iterable<int> where(bool f(int element)) => new WhereIterable<int>(this, f); 12839 Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this , f);
12838 12840
12839 bool every(bool f(int element)) => Collections.every(this, f); 12841 bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
12840 12842
12841 bool any(bool f(int element)) => Collections.any(this, f); 12843 bool any(bool f(int element)) => IterableMixinWorkaround.any(this, f);
12842 12844
12843 List<int> toList() => new List<int>.from(this); 12845 List<int> toList() => new List<int>.from(this);
12844 Set<int> toSet() => new Set<int>.from(this); 12846 Set<int> toSet() => new Set<int>.from(this);
12845 12847
12846 bool get isEmpty => this.length == 0; 12848 bool get isEmpty => this.length == 0;
12847 12849
12848 List<int> take(int n) => new ListView<int>(this, 0, n); 12850 List<int> take(int n) => IterableMixinWorkaround.takeList(this, n);
12849 12851
12850 Iterable<int> takeWhile(bool test(int value)) { 12852 Iterable<int> takeWhile(bool test(int value)) {
12851 return new TakeWhileIterable<int>(this, test); 12853 return IterableMixinWorkaround.takeWhile(this, test);
12852 } 12854 }
12853 12855
12854 List<int> skip(int n) => new ListView<int>(this, n, null); 12856 List<int> skip(int n) => IterableMixinWorkaround.skipList(this, n);
12855 12857
12856 Iterable<int> skipWhile(bool test(int value)) { 12858 Iterable<int> skipWhile(bool test(int value)) {
12857 return new SkipWhileIterable<int>(this, test); 12859 return IterableMixinWorkaround.skipWhile(this, test);
12858 } 12860 }
12859 12861
12860 int firstMatching(bool test(int value), { int orElse() }) { 12862 int firstMatching(bool test(int value), { int orElse() }) {
12861 return Collections.firstMatching(this, test, orElse); 12863 return IterableMixinWorkaround.firstMatching(this, test, orElse);
12862 } 12864 }
12863 12865
12864 int lastMatching(bool test(int value), {int orElse()}) { 12866 int lastMatching(bool test(int value), {int orElse()}) {
12865 return Collections.lastMatchingInList(this, test, orElse); 12867 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
12866 } 12868 }
12867 12869
12868 int singleMatching(bool test(int value)) { 12870 int singleMatching(bool test(int value)) {
12869 return Collections.singleMatching(this, test); 12871 return IterableMixinWorkaround.singleMatching(this, test);
12870 } 12872 }
12871 12873
12872 int elementAt(int index) { 12874 int elementAt(int index) {
12873 return this[index]; 12875 return this[index];
12874 } 12876 }
12875 12877
12876 // From Collection<int>: 12878 // From Collection<int>:
12877 12879
12878 void add(int value) { 12880 void add(int value) {
12879 throw new UnsupportedError("Cannot add to immutable List."); 12881 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
12917 if (this.length > 0) return this[this.length - 1]; 12919 if (this.length > 0) return this[this.length - 1];
12918 throw new StateError("No elements"); 12920 throw new StateError("No elements");
12919 } 12921 }
12920 12922
12921 int get single { 12923 int get single {
12922 if (length == 1) return this[0]; 12924 if (length == 1) return this[0];
12923 if (length == 0) throw new StateError("No elements"); 12925 if (length == 0) throw new StateError("No elements");
12924 throw new StateError("More than one element"); 12926 throw new StateError("More than one element");
12925 } 12927 }
12926 12928
12927 int min([int compare(int a, int b)]) => Collections.min(this, compare); 12929 int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, comp are);
12928 12930
12929 int max([int compare(int a, int b)]) => Collections.max(this, compare); 12931 int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, comp are);
12930 12932
12931 int removeAt(int pos) { 12933 int removeAt(int pos) {
12932 throw new UnsupportedError("Cannot removeAt on immutable List."); 12934 throw new UnsupportedError("Cannot removeAt on immutable List.");
12933 } 12935 }
12934 12936
12935 int removeLast() { 12937 int removeLast() {
12936 throw new UnsupportedError("Cannot removeLast on immutable List."); 12938 throw new UnsupportedError("Cannot removeLast on immutable List.");
12937 } 12939 }
12938 12940
12939 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { 12941 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
14700 // From Iterable<Node>: 14702 // From Iterable<Node>:
14701 14703
14702 Iterator<Node> get iterator { 14704 Iterator<Node> get iterator {
14703 // Note: NodeLists are not fixed size. And most probably length shouldn't 14705 // Note: NodeLists are not fixed size. And most probably length shouldn't
14704 // be cached in both iterator _and_ forEach method. For now caching it 14706 // be cached in both iterator _and_ forEach method. For now caching it
14705 // for consistency. 14707 // for consistency.
14706 return new FixedSizeListIterator<Node>(this); 14708 return new FixedSizeListIterator<Node>(this);
14707 } 14709 }
14708 14710
14709 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) { 14711 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
14710 return Collections.reduce(this, initialValue, combine); 14712 return IterableMixinWorkaround.reduce(this, initialValue, combine);
14711 } 14713 }
14712 14714
14713 bool contains(Node element) => Collections.contains(this, element); 14715 bool contains(Node element) => IterableMixinWorkaround.contains(this, element) ;
14714 14716
14715 void forEach(void f(Node element)) => Collections.forEach(this, f); 14717 void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f) ;
14716 14718
14717 String join([String separator]) => Collections.joinList(this, separator); 14719 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
14718 14720
14719 List mappedBy(f(Node element)) => new MappedList<Node, dynamic>(this, f); 14721 List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f );
14720 14722
14721 Iterable<Node> where(bool f(Node element)) => new WhereIterable<Node>(this, f) ; 14723 Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(th is, f);
14722 14724
14723 bool every(bool f(Node element)) => Collections.every(this, f); 14725 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
14724 14726
14725 bool any(bool f(Node element)) => Collections.any(this, f); 14727 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
14726 14728
14727 List<Node> toList() => new List<Node>.from(this); 14729 List<Node> toList() => new List<Node>.from(this);
14728 Set<Node> toSet() => new Set<Node>.from(this); 14730 Set<Node> toSet() => new Set<Node>.from(this);
14729 14731
14730 bool get isEmpty => this.length == 0; 14732 bool get isEmpty => this.length == 0;
14731 14733
14732 List<Node> take(int n) => new ListView<Node>(this, 0, n); 14734 List<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
14733 14735
14734 Iterable<Node> takeWhile(bool test(Node value)) { 14736 Iterable<Node> takeWhile(bool test(Node value)) {
14735 return new TakeWhileIterable<Node>(this, test); 14737 return IterableMixinWorkaround.takeWhile(this, test);
14736 } 14738 }
14737 14739
14738 List<Node> skip(int n) => new ListView<Node>(this, n, null); 14740 List<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
14739 14741
14740 Iterable<Node> skipWhile(bool test(Node value)) { 14742 Iterable<Node> skipWhile(bool test(Node value)) {
14741 return new SkipWhileIterable<Node>(this, test); 14743 return IterableMixinWorkaround.skipWhile(this, test);
14742 } 14744 }
14743 14745
14744 Node firstMatching(bool test(Node value), { Node orElse() }) { 14746 Node firstMatching(bool test(Node value), { Node orElse() }) {
14745 return Collections.firstMatching(this, test, orElse); 14747 return IterableMixinWorkaround.firstMatching(this, test, orElse);
14746 } 14748 }
14747 14749
14748 Node lastMatching(bool test(Node value), {Node orElse()}) { 14750 Node lastMatching(bool test(Node value), {Node orElse()}) {
14749 return Collections.lastMatchingInList(this, test, orElse); 14751 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
14750 } 14752 }
14751 14753
14752 Node singleMatching(bool test(Node value)) { 14754 Node singleMatching(bool test(Node value)) {
14753 return Collections.singleMatching(this, test); 14755 return IterableMixinWorkaround.singleMatching(this, test);
14754 } 14756 }
14755 14757
14756 Node elementAt(int index) { 14758 Node elementAt(int index) {
14757 return this[index]; 14759 return this[index];
14758 } 14760 }
14759 14761
14760 // From Collection<Node>: 14762 // From Collection<Node>:
14761 14763
14762 void add(Node value) { 14764 void add(Node value) {
14763 throw new UnsupportedError("Cannot add to immutable List."); 14765 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
14801 if (this.length > 0) return this[this.length - 1]; 14803 if (this.length > 0) return this[this.length - 1];
14802 throw new StateError("No elements"); 14804 throw new StateError("No elements");
14803 } 14805 }
14804 14806
14805 Node get single { 14807 Node get single {
14806 if (length == 1) return this[0]; 14808 if (length == 1) return this[0];
14807 if (length == 0) throw new StateError("No elements"); 14809 if (length == 0) throw new StateError("No elements");
14808 throw new StateError("More than one element"); 14810 throw new StateError("More than one element");
14809 } 14811 }
14810 14812
14811 Node min([int compare(Node a, Node b)]) => Collections.min(this, compare); 14813 Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, c ompare);
14812 14814
14813 Node max([int compare(Node a, Node b)]) => Collections.max(this, compare); 14815 Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, c ompare);
14814 14816
14815 Node removeAt(int pos) { 14817 Node removeAt(int pos) {
14816 throw new UnsupportedError("Cannot removeAt on immutable List."); 14818 throw new UnsupportedError("Cannot removeAt on immutable List.");
14817 } 14819 }
14818 14820
14819 Node removeLast() { 14821 Node removeLast() {
14820 throw new UnsupportedError("Cannot removeLast on immutable List."); 14822 throw new UnsupportedError("Cannot removeLast on immutable List.");
14821 } 14823 }
14822 14824
14823 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) { 14825 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
15002 return result; 15004 return result;
15003 } 15005 }
15004 Node get single { 15006 Node get single {
15005 int l = this.length; 15007 int l = this.length;
15006 if (l == 0) throw new StateError("No elements"); 15008 if (l == 0) throw new StateError("No elements");
15007 if (l > 1) throw new StateError("More than one element"); 15009 if (l > 1) throw new StateError("More than one element");
15008 return JS('Node', '#.firstChild', _this); 15010 return JS('Node', '#.firstChild', _this);
15009 } 15011 }
15010 15012
15011 Node min([int compare(Node a, Node b)]) { 15013 Node min([int compare(Node a, Node b)]) {
15012 return Collections.min(this, compare); 15014 return IterableMixinWorkaround.min(this, compare);
15013 } 15015 }
15014 15016
15015 Node max([int compare(Node a, Node b)]) { 15017 Node max([int compare(Node a, Node b)]) {
15016 return Collections.max(this, compare); 15018 return IterableMixinWorkaround.max(this, compare);
15017 } 15019 }
15018 15020
15019 void add(Node value) { 15021 void add(Node value) {
15020 _this.$dom_appendChild(value); 15022 _this.$dom_appendChild(value);
15021 } 15023 }
15022 15024
15023 void addLast(Node value) { 15025 void addLast(Node value) {
15024 _this.$dom_appendChild(value); 15026 _this.$dom_appendChild(value);
15025 } 15027 }
15026 15028
(...skipping 25 matching lines...) Expand all
15052 } 15054 }
15053 15055
15054 void operator []=(int index, Node value) { 15056 void operator []=(int index, Node value) {
15055 _this.$dom_replaceChild(value, this[index]); 15057 _this.$dom_replaceChild(value, this[index]);
15056 } 15058 }
15057 15059
15058 Iterator<Node> get iterator => _this.$dom_childNodes.iterator; 15060 Iterator<Node> get iterator => _this.$dom_childNodes.iterator;
15059 15061
15060 // TODO(jacobr): We can implement these methods much more efficiently by 15062 // TODO(jacobr): We can implement these methods much more efficiently by
15061 // looking up the nodeList only once instead of once per iteration. 15063 // looking up the nodeList only once instead of once per iteration.
15062 bool contains(Node element) => Collections.contains(this, element); 15064 bool contains(Node element) => IterableMixinWorkaround.contains(this, element) ;
15063 15065
15064 void forEach(void f(Node element)) => Collections.forEach(this, f); 15066 void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f) ;
15065 15067
15066 dynamic reduce(dynamic initialValue, 15068 dynamic reduce(dynamic initialValue,
15067 dynamic combine(dynamic previousValue, Node element)) { 15069 dynamic combine(dynamic previousValue, Node element)) {
15068 return Collections.reduce(this, initialValue, combine); 15070 return IterableMixinWorkaround.reduce(this, initialValue, combine);
15069 } 15071 }
15070 15072
15071 String join([String separator]) { 15073 String join([String separator]) {
15072 return Collections.joinList(this, separator); 15074 return IterableMixinWorkaround.joinList(this, separator);
15073 } 15075 }
15074 15076
15075 List mappedBy(f(Node element)) => 15077 List mappedBy(f(Node element)) {
15076 new MappedList<Node, dynamic>(this, f); 15078 return IterableMixinWorkaround.mappedByList(this, f);
15079 }
15077 15080
15078 Iterable<Node> where(bool f(Node element)) => 15081 Iterable<Node> where(bool f(Node element)) {
15079 new WhereIterable<Node>(this, f); 15082 return IterableMixinWorkaround.where(this, f);
15083 }
15080 15084
15081 bool every(bool f(Node element)) => Collections.every(this, f); 15085 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
15082 15086
15083 bool any(bool f(Node element)) => Collections.any(this, f); 15087 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
15084 15088
15085 List<Node> toList() => new List<Node>.from(this); 15089 List<Node> toList() => new List<Node>.from(this);
15086 Set<Node> toSet() => new Set<Node>.from(this); 15090 Set<Node> toSet() => new Set<Node>.from(this);
15087 15091
15088 bool get isEmpty => this.length == 0; 15092 bool get isEmpty => this.length == 0;
15089 15093
15090 // From List<Node>: 15094 // From List<Node>:
15091 15095
15092 List<Node> take(int n) { 15096 List<Node> take(int n) {
15093 return new ListView<Node>(this, 0, n); 15097 return IterableMixinWorkaround.takeList(this, n);
15094 } 15098 }
15095 15099
15096 Iterable<Node> takeWhile(bool test(Node value)) { 15100 Iterable<Node> takeWhile(bool test(Node value)) {
15097 return new TakeWhileIterable<Node>(this, test); 15101 return IterableMixinWorkaround.takeWhile(this, test);
15098 } 15102 }
15099 15103
15100 List<Node> skip(int n) { 15104 List<Node> skip(int n) {
15101 return new ListView<Node>(this, n, null); 15105 return IterableMixinWorkaround.skipList(this, n);
15102 } 15106 }
15103 15107
15104 Iterable<Node> skipWhile(bool test(Node value)) { 15108 Iterable<Node> skipWhile(bool test(Node value)) {
15105 return new SkipWhileIterable<Node>(this, test); 15109 return IterableMixinWorkaround.skipWhile(this, test);
15106 } 15110 }
15107 15111
15108 Node firstMatching(bool test(Node value), {Node orElse()}) { 15112 Node firstMatching(bool test(Node value), {Node orElse()}) {
15109 return Collections.firstMatching(this, test, orElse); 15113 return IterableMixinWorkaround.firstMatching(this, test, orElse);
15110 } 15114 }
15111 15115
15112 Node lastMatching(bool test(Node value), {Node orElse()}) { 15116 Node lastMatching(bool test(Node value), {Node orElse()}) {
15113 return Collections.lastMatchingInList(this, test, orElse); 15117 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
15114 } 15118 }
15115 15119
15116 Node singleMatching(bool test(Node value)) { 15120 Node singleMatching(bool test(Node value)) {
15117 return Collections.singleMatching(this, test); 15121 return IterableMixinWorkaround.singleMatching(this, test);
15118 } 15122 }
15119 15123
15120 Node elementAt(int index) { 15124 Node elementAt(int index) {
15121 return this[index]; 15125 return this[index];
15122 } 15126 }
15123 15127
15124 // TODO(jacobr): this could be implemented for child node lists. 15128 // TODO(jacobr): this could be implemented for child node lists.
15125 // The exception we throw here is misleading. 15129 // The exception we throw here is misleading.
15126 void sort([int compare(Node a, Node b)]) { 15130 void sort([int compare(Node a, Node b)]) {
15127 throw new UnsupportedError("Cannot sort immutable List."); 15131 throw new UnsupportedError("Cannot sort immutable List.");
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
15406 // From Iterable<Node>: 15410 // From Iterable<Node>:
15407 15411
15408 Iterator<Node> get iterator { 15412 Iterator<Node> get iterator {
15409 // Note: NodeLists are not fixed size. And most probably length shouldn't 15413 // Note: NodeLists are not fixed size. And most probably length shouldn't
15410 // be cached in both iterator _and_ forEach method. For now caching it 15414 // be cached in both iterator _and_ forEach method. For now caching it
15411 // for consistency. 15415 // for consistency.
15412 return new FixedSizeListIterator<Node>(this); 15416 return new FixedSizeListIterator<Node>(this);
15413 } 15417 }
15414 15418
15415 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) { 15419 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
15416 return Collections.reduce(this, initialValue, combine); 15420 return IterableMixinWorkaround.reduce(this, initialValue, combine);
15417 } 15421 }
15418 15422
15419 bool contains(Node element) => Collections.contains(this, element); 15423 bool contains(Node element) => IterableMixinWorkaround.contains(this, element) ;
15420 15424
15421 void forEach(void f(Node element)) => Collections.forEach(this, f); 15425 void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f) ;
15422 15426
15423 String join([String separator]) => Collections.joinList(this, separator); 15427 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
15424 15428
15425 List mappedBy(f(Node element)) => new MappedList<Node, dynamic>(this, f); 15429 List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f );
15426 15430
15427 Iterable<Node> where(bool f(Node element)) => new WhereIterable<Node>(this, f) ; 15431 Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(th is, f);
15428 15432
15429 bool every(bool f(Node element)) => Collections.every(this, f); 15433 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
15430 15434
15431 bool any(bool f(Node element)) => Collections.any(this, f); 15435 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
15432 15436
15433 List<Node> toList() => new List<Node>.from(this); 15437 List<Node> toList() => new List<Node>.from(this);
15434 Set<Node> toSet() => new Set<Node>.from(this); 15438 Set<Node> toSet() => new Set<Node>.from(this);
15435 15439
15436 bool get isEmpty => this.length == 0; 15440 bool get isEmpty => this.length == 0;
15437 15441
15438 List<Node> take(int n) => new ListView<Node>(this, 0, n); 15442 List<Node> take(int n) => IterableMixinWorkaround.takeList(this, n);
15439 15443
15440 Iterable<Node> takeWhile(bool test(Node value)) { 15444 Iterable<Node> takeWhile(bool test(Node value)) {
15441 return new TakeWhileIterable<Node>(this, test); 15445 return IterableMixinWorkaround.takeWhile(this, test);
15442 } 15446 }
15443 15447
15444 List<Node> skip(int n) => new ListView<Node>(this, n, null); 15448 List<Node> skip(int n) => IterableMixinWorkaround.skipList(this, n);
15445 15449
15446 Iterable<Node> skipWhile(bool test(Node value)) { 15450 Iterable<Node> skipWhile(bool test(Node value)) {
15447 return new SkipWhileIterable<Node>(this, test); 15451 return IterableMixinWorkaround.skipWhile(this, test);
15448 } 15452 }
15449 15453
15450 Node firstMatching(bool test(Node value), { Node orElse() }) { 15454 Node firstMatching(bool test(Node value), { Node orElse() }) {
15451 return Collections.firstMatching(this, test, orElse); 15455 return IterableMixinWorkaround.firstMatching(this, test, orElse);
15452 } 15456 }
15453 15457
15454 Node lastMatching(bool test(Node value), {Node orElse()}) { 15458 Node lastMatching(bool test(Node value), {Node orElse()}) {
15455 return Collections.lastMatchingInList(this, test, orElse); 15459 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
15456 } 15460 }
15457 15461
15458 Node singleMatching(bool test(Node value)) { 15462 Node singleMatching(bool test(Node value)) {
15459 return Collections.singleMatching(this, test); 15463 return IterableMixinWorkaround.singleMatching(this, test);
15460 } 15464 }
15461 15465
15462 Node elementAt(int index) { 15466 Node elementAt(int index) {
15463 return this[index]; 15467 return this[index];
15464 } 15468 }
15465 15469
15466 // From Collection<Node>: 15470 // From Collection<Node>:
15467 15471
15468 void add(Node value) { 15472 void add(Node value) {
15469 throw new UnsupportedError("Cannot add to immutable List."); 15473 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
15507 if (this.length > 0) return this[this.length - 1]; 15511 if (this.length > 0) return this[this.length - 1];
15508 throw new StateError("No elements"); 15512 throw new StateError("No elements");
15509 } 15513 }
15510 15514
15511 Node get single { 15515 Node get single {
15512 if (length == 1) return this[0]; 15516 if (length == 1) return this[0];
15513 if (length == 0) throw new StateError("No elements"); 15517 if (length == 0) throw new StateError("No elements");
15514 throw new StateError("More than one element"); 15518 throw new StateError("More than one element");
15515 } 15519 }
15516 15520
15517 Node min([int compare(Node a, Node b)]) => Collections.min(this, compare); 15521 Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, c ompare);
15518 15522
15519 Node max([int compare(Node a, Node b)]) => Collections.max(this, compare); 15523 Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, c ompare);
15520 15524
15521 Node removeAt(int pos) { 15525 Node removeAt(int pos) {
15522 throw new UnsupportedError("Cannot removeAt on immutable List."); 15526 throw new UnsupportedError("Cannot removeAt on immutable List.");
15523 } 15527 }
15524 15528
15525 Node removeLast() { 15529 Node removeLast() {
15526 throw new UnsupportedError("Cannot removeLast on immutable List."); 15530 throw new UnsupportedError("Cannot removeLast on immutable List.");
15527 } 15531 }
15528 15532
15529 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) { 15533 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
17468 // From Iterable<SourceBuffer>: 17472 // From Iterable<SourceBuffer>:
17469 17473
17470 Iterator<SourceBuffer> get iterator { 17474 Iterator<SourceBuffer> get iterator {
17471 // Note: NodeLists are not fixed size. And most probably length shouldn't 17475 // Note: NodeLists are not fixed size. And most probably length shouldn't
17472 // be cached in both iterator _and_ forEach method. For now caching it 17476 // be cached in both iterator _and_ forEach method. For now caching it
17473 // for consistency. 17477 // for consistency.
17474 return new FixedSizeListIterator<SourceBuffer>(this); 17478 return new FixedSizeListIterator<SourceBuffer>(this);
17475 } 17479 }
17476 17480
17477 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SourceBuffer)) { 17481 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SourceBuffer)) {
17478 return Collections.reduce(this, initialValue, combine); 17482 return IterableMixinWorkaround.reduce(this, initialValue, combine);
17479 } 17483 }
17480 17484
17481 bool contains(SourceBuffer element) => Collections.contains(this, element); 17485 bool contains(SourceBuffer element) => IterableMixinWorkaround.contains(this, element);
17482 17486
17483 void forEach(void f(SourceBuffer element)) => Collections.forEach(this, f); 17487 void forEach(void f(SourceBuffer element)) => IterableMixinWorkaround.forEach( this, f);
17484 17488
17485 String join([String separator]) => Collections.joinList(this, separator); 17489 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
17486 17490
17487 List mappedBy(f(SourceBuffer element)) => new MappedList<SourceBuffer, dynamic >(this, f); 17491 List mappedBy(f(SourceBuffer element)) => IterableMixinWorkaround.mappedByList (this, f);
17488 17492
17489 Iterable<SourceBuffer> where(bool f(SourceBuffer element)) => new WhereIterabl e<SourceBuffer>(this, f); 17493 Iterable<SourceBuffer> where(bool f(SourceBuffer element)) => IterableMixinWor karound.where(this, f);
17490 17494
17491 bool every(bool f(SourceBuffer element)) => Collections.every(this, f); 17495 bool every(bool f(SourceBuffer element)) => IterableMixinWorkaround.every(this , f);
17492 17496
17493 bool any(bool f(SourceBuffer element)) => Collections.any(this, f); 17497 bool any(bool f(SourceBuffer element)) => IterableMixinWorkaround.any(this, f) ;
17494 17498
17495 List<SourceBuffer> toList() => new List<SourceBuffer>.from(this); 17499 List<SourceBuffer> toList() => new List<SourceBuffer>.from(this);
17496 Set<SourceBuffer> toSet() => new Set<SourceBuffer>.from(this); 17500 Set<SourceBuffer> toSet() => new Set<SourceBuffer>.from(this);
17497 17501
17498 bool get isEmpty => this.length == 0; 17502 bool get isEmpty => this.length == 0;
17499 17503
17500 List<SourceBuffer> take(int n) => new ListView<SourceBuffer>(this, 0, n); 17504 List<SourceBuffer> take(int n) => IterableMixinWorkaround.takeList(this, n);
17501 17505
17502 Iterable<SourceBuffer> takeWhile(bool test(SourceBuffer value)) { 17506 Iterable<SourceBuffer> takeWhile(bool test(SourceBuffer value)) {
17503 return new TakeWhileIterable<SourceBuffer>(this, test); 17507 return IterableMixinWorkaround.takeWhile(this, test);
17504 } 17508 }
17505 17509
17506 List<SourceBuffer> skip(int n) => new ListView<SourceBuffer>(this, n, null); 17510 List<SourceBuffer> skip(int n) => IterableMixinWorkaround.skipList(this, n);
17507 17511
17508 Iterable<SourceBuffer> skipWhile(bool test(SourceBuffer value)) { 17512 Iterable<SourceBuffer> skipWhile(bool test(SourceBuffer value)) {
17509 return new SkipWhileIterable<SourceBuffer>(this, test); 17513 return IterableMixinWorkaround.skipWhile(this, test);
17510 } 17514 }
17511 17515
17512 SourceBuffer firstMatching(bool test(SourceBuffer value), { SourceBuffer orEls e() }) { 17516 SourceBuffer firstMatching(bool test(SourceBuffer value), { SourceBuffer orEls e() }) {
17513 return Collections.firstMatching(this, test, orElse); 17517 return IterableMixinWorkaround.firstMatching(this, test, orElse);
17514 } 17518 }
17515 17519
17516 SourceBuffer lastMatching(bool test(SourceBuffer value), {SourceBuffer orElse( )}) { 17520 SourceBuffer lastMatching(bool test(SourceBuffer value), {SourceBuffer orElse( )}) {
17517 return Collections.lastMatchingInList(this, test, orElse); 17521 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
17518 } 17522 }
17519 17523
17520 SourceBuffer singleMatching(bool test(SourceBuffer value)) { 17524 SourceBuffer singleMatching(bool test(SourceBuffer value)) {
17521 return Collections.singleMatching(this, test); 17525 return IterableMixinWorkaround.singleMatching(this, test);
17522 } 17526 }
17523 17527
17524 SourceBuffer elementAt(int index) { 17528 SourceBuffer elementAt(int index) {
17525 return this[index]; 17529 return this[index];
17526 } 17530 }
17527 17531
17528 // From Collection<SourceBuffer>: 17532 // From Collection<SourceBuffer>:
17529 17533
17530 void add(SourceBuffer value) { 17534 void add(SourceBuffer value) {
17531 throw new UnsupportedError("Cannot add to immutable List."); 17535 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
17569 if (this.length > 0) return this[this.length - 1]; 17573 if (this.length > 0) return this[this.length - 1];
17570 throw new StateError("No elements"); 17574 throw new StateError("No elements");
17571 } 17575 }
17572 17576
17573 SourceBuffer get single { 17577 SourceBuffer get single {
17574 if (length == 1) return this[0]; 17578 if (length == 1) return this[0];
17575 if (length == 0) throw new StateError("No elements"); 17579 if (length == 0) throw new StateError("No elements");
17576 throw new StateError("More than one element"); 17580 throw new StateError("More than one element");
17577 } 17581 }
17578 17582
17579 SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) => Collections .min(this, compare); 17583 SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) => IterableMix inWorkaround.min(this, compare);
17580 17584
17581 SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) => Collections .max(this, compare); 17585 SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) => IterableMix inWorkaround.max(this, compare);
17582 17586
17583 SourceBuffer removeAt(int pos) { 17587 SourceBuffer removeAt(int pos) {
17584 throw new UnsupportedError("Cannot removeAt on immutable List."); 17588 throw new UnsupportedError("Cannot removeAt on immutable List.");
17585 } 17589 }
17586 17590
17587 SourceBuffer removeLast() { 17591 SourceBuffer removeLast() {
17588 throw new UnsupportedError("Cannot removeLast on immutable List."); 17592 throw new UnsupportedError("Cannot removeLast on immutable List.");
17589 } 17593 }
17590 17594
17591 void setRange(int start, int rangeLength, List<SourceBuffer> from, [int startF rom]) { 17595 void setRange(int start, int rangeLength, List<SourceBuffer> from, [int startF rom]) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
17703 // From Iterable<SpeechGrammar>: 17707 // From Iterable<SpeechGrammar>:
17704 17708
17705 Iterator<SpeechGrammar> get iterator { 17709 Iterator<SpeechGrammar> get iterator {
17706 // Note: NodeLists are not fixed size. And most probably length shouldn't 17710 // Note: NodeLists are not fixed size. And most probably length shouldn't
17707 // be cached in both iterator _and_ forEach method. For now caching it 17711 // be cached in both iterator _and_ forEach method. For now caching it
17708 // for consistency. 17712 // for consistency.
17709 return new FixedSizeListIterator<SpeechGrammar>(this); 17713 return new FixedSizeListIterator<SpeechGrammar>(this);
17710 } 17714 }
17711 17715
17712 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechGrammar)) { 17716 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechGrammar)) {
17713 return Collections.reduce(this, initialValue, combine); 17717 return IterableMixinWorkaround.reduce(this, initialValue, combine);
17714 } 17718 }
17715 17719
17716 bool contains(SpeechGrammar element) => Collections.contains(this, element); 17720 bool contains(SpeechGrammar element) => IterableMixinWorkaround.contains(this, element);
17717 17721
17718 void forEach(void f(SpeechGrammar element)) => Collections.forEach(this, f); 17722 void forEach(void f(SpeechGrammar element)) => IterableMixinWorkaround.forEach (this, f);
17719 17723
17720 String join([String separator]) => Collections.joinList(this, separator); 17724 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
17721 17725
17722 List mappedBy(f(SpeechGrammar element)) => new MappedList<SpeechGrammar, dynam ic>(this, f); 17726 List mappedBy(f(SpeechGrammar element)) => IterableMixinWorkaround.mappedByLis t(this, f);
17723 17727
17724 Iterable<SpeechGrammar> where(bool f(SpeechGrammar element)) => new WhereItera ble<SpeechGrammar>(this, f); 17728 Iterable<SpeechGrammar> where(bool f(SpeechGrammar element)) => IterableMixinW orkaround.where(this, f);
17725 17729
17726 bool every(bool f(SpeechGrammar element)) => Collections.every(this, f); 17730 bool every(bool f(SpeechGrammar element)) => IterableMixinWorkaround.every(thi s, f);
17727 17731
17728 bool any(bool f(SpeechGrammar element)) => Collections.any(this, f); 17732 bool any(bool f(SpeechGrammar element)) => IterableMixinWorkaround.any(this, f );
17729 17733
17730 List<SpeechGrammar> toList() => new List<SpeechGrammar>.from(this); 17734 List<SpeechGrammar> toList() => new List<SpeechGrammar>.from(this);
17731 Set<SpeechGrammar> toSet() => new Set<SpeechGrammar>.from(this); 17735 Set<SpeechGrammar> toSet() => new Set<SpeechGrammar>.from(this);
17732 17736
17733 bool get isEmpty => this.length == 0; 17737 bool get isEmpty => this.length == 0;
17734 17738
17735 List<SpeechGrammar> take(int n) => new ListView<SpeechGrammar>(this, 0, n); 17739 List<SpeechGrammar> take(int n) => IterableMixinWorkaround.takeList(this, n);
17736 17740
17737 Iterable<SpeechGrammar> takeWhile(bool test(SpeechGrammar value)) { 17741 Iterable<SpeechGrammar> takeWhile(bool test(SpeechGrammar value)) {
17738 return new TakeWhileIterable<SpeechGrammar>(this, test); 17742 return IterableMixinWorkaround.takeWhile(this, test);
17739 } 17743 }
17740 17744
17741 List<SpeechGrammar> skip(int n) => new ListView<SpeechGrammar>(this, n, null); 17745 List<SpeechGrammar> skip(int n) => IterableMixinWorkaround.skipList(this, n);
17742 17746
17743 Iterable<SpeechGrammar> skipWhile(bool test(SpeechGrammar value)) { 17747 Iterable<SpeechGrammar> skipWhile(bool test(SpeechGrammar value)) {
17744 return new SkipWhileIterable<SpeechGrammar>(this, test); 17748 return IterableMixinWorkaround.skipWhile(this, test);
17745 } 17749 }
17746 17750
17747 SpeechGrammar firstMatching(bool test(SpeechGrammar value), { SpeechGrammar or Else() }) { 17751 SpeechGrammar firstMatching(bool test(SpeechGrammar value), { SpeechGrammar or Else() }) {
17748 return Collections.firstMatching(this, test, orElse); 17752 return IterableMixinWorkaround.firstMatching(this, test, orElse);
17749 } 17753 }
17750 17754
17751 SpeechGrammar lastMatching(bool test(SpeechGrammar value), {SpeechGrammar orEl se()}) { 17755 SpeechGrammar lastMatching(bool test(SpeechGrammar value), {SpeechGrammar orEl se()}) {
17752 return Collections.lastMatchingInList(this, test, orElse); 17756 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
17753 } 17757 }
17754 17758
17755 SpeechGrammar singleMatching(bool test(SpeechGrammar value)) { 17759 SpeechGrammar singleMatching(bool test(SpeechGrammar value)) {
17756 return Collections.singleMatching(this, test); 17760 return IterableMixinWorkaround.singleMatching(this, test);
17757 } 17761 }
17758 17762
17759 SpeechGrammar elementAt(int index) { 17763 SpeechGrammar elementAt(int index) {
17760 return this[index]; 17764 return this[index];
17761 } 17765 }
17762 17766
17763 // From Collection<SpeechGrammar>: 17767 // From Collection<SpeechGrammar>:
17764 17768
17765 void add(SpeechGrammar value) { 17769 void add(SpeechGrammar value) {
17766 throw new UnsupportedError("Cannot add to immutable List."); 17770 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
17804 if (this.length > 0) return this[this.length - 1]; 17808 if (this.length > 0) return this[this.length - 1];
17805 throw new StateError("No elements"); 17809 throw new StateError("No elements");
17806 } 17810 }
17807 17811
17808 SpeechGrammar get single { 17812 SpeechGrammar get single {
17809 if (length == 1) return this[0]; 17813 if (length == 1) return this[0];
17810 if (length == 0) throw new StateError("No elements"); 17814 if (length == 0) throw new StateError("No elements");
17811 throw new StateError("More than one element"); 17815 throw new StateError("More than one element");
17812 } 17816 }
17813 17817
17814 SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) => Collecti ons.min(this, compare); 17818 SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) => Iterable MixinWorkaround.min(this, compare);
17815 17819
17816 SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) => Collecti ons.max(this, compare); 17820 SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) => Iterable MixinWorkaround.max(this, compare);
17817 17821
17818 SpeechGrammar removeAt(int pos) { 17822 SpeechGrammar removeAt(int pos) {
17819 throw new UnsupportedError("Cannot removeAt on immutable List."); 17823 throw new UnsupportedError("Cannot removeAt on immutable List.");
17820 } 17824 }
17821 17825
17822 SpeechGrammar removeLast() { 17826 SpeechGrammar removeLast() {
17823 throw new UnsupportedError("Cannot removeLast on immutable List."); 17827 throw new UnsupportedError("Cannot removeLast on immutable List.");
17824 } 17828 }
17825 17829
17826 void setRange(int start, int rangeLength, List<SpeechGrammar> from, [int start From]) { 17830 void setRange(int start, int rangeLength, List<SpeechGrammar> from, [int start From]) {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
18199 // From Iterable<Map>: 18203 // From Iterable<Map>:
18200 18204
18201 Iterator<Map> get iterator { 18205 Iterator<Map> get iterator {
18202 // Note: NodeLists are not fixed size. And most probably length shouldn't 18206 // Note: NodeLists are not fixed size. And most probably length shouldn't
18203 // be cached in both iterator _and_ forEach method. For now caching it 18207 // be cached in both iterator _and_ forEach method. For now caching it
18204 // for consistency. 18208 // for consistency.
18205 return new FixedSizeListIterator<Map>(this); 18209 return new FixedSizeListIterator<Map>(this);
18206 } 18210 }
18207 18211
18208 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) { 18212 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) {
18209 return Collections.reduce(this, initialValue, combine); 18213 return IterableMixinWorkaround.reduce(this, initialValue, combine);
18210 } 18214 }
18211 18215
18212 bool contains(Map element) => Collections.contains(this, element); 18216 bool contains(Map element) => IterableMixinWorkaround.contains(this, element);
18213 18217
18214 void forEach(void f(Map element)) => Collections.forEach(this, f); 18218 void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f);
18215 18219
18216 String join([String separator]) => Collections.joinList(this, separator); 18220 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
18217 18221
18218 List mappedBy(f(Map element)) => new MappedList<Map, dynamic>(this, f); 18222 List mappedBy(f(Map element)) => IterableMixinWorkaround.mappedByList(this, f) ;
18219 18223
18220 Iterable<Map> where(bool f(Map element)) => new WhereIterable<Map>(this, f); 18224 Iterable<Map> where(bool f(Map element)) => IterableMixinWorkaround.where(this , f);
18221 18225
18222 bool every(bool f(Map element)) => Collections.every(this, f); 18226 bool every(bool f(Map element)) => IterableMixinWorkaround.every(this, f);
18223 18227
18224 bool any(bool f(Map element)) => Collections.any(this, f); 18228 bool any(bool f(Map element)) => IterableMixinWorkaround.any(this, f);
18225 18229
18226 List<Map> toList() => new List<Map>.from(this); 18230 List<Map> toList() => new List<Map>.from(this);
18227 Set<Map> toSet() => new Set<Map>.from(this); 18231 Set<Map> toSet() => new Set<Map>.from(this);
18228 18232
18229 bool get isEmpty => this.length == 0; 18233 bool get isEmpty => this.length == 0;
18230 18234
18231 List<Map> take(int n) => new ListView<Map>(this, 0, n); 18235 List<Map> take(int n) => IterableMixinWorkaround.takeList(this, n);
18232 18236
18233 Iterable<Map> takeWhile(bool test(Map value)) { 18237 Iterable<Map> takeWhile(bool test(Map value)) {
18234 return new TakeWhileIterable<Map>(this, test); 18238 return IterableMixinWorkaround.takeWhile(this, test);
18235 } 18239 }
18236 18240
18237 List<Map> skip(int n) => new ListView<Map>(this, n, null); 18241 List<Map> skip(int n) => IterableMixinWorkaround.skipList(this, n);
18238 18242
18239 Iterable<Map> skipWhile(bool test(Map value)) { 18243 Iterable<Map> skipWhile(bool test(Map value)) {
18240 return new SkipWhileIterable<Map>(this, test); 18244 return IterableMixinWorkaround.skipWhile(this, test);
18241 } 18245 }
18242 18246
18243 Map firstMatching(bool test(Map value), { Map orElse() }) { 18247 Map firstMatching(bool test(Map value), { Map orElse() }) {
18244 return Collections.firstMatching(this, test, orElse); 18248 return IterableMixinWorkaround.firstMatching(this, test, orElse);
18245 } 18249 }
18246 18250
18247 Map lastMatching(bool test(Map value), {Map orElse()}) { 18251 Map lastMatching(bool test(Map value), {Map orElse()}) {
18248 return Collections.lastMatchingInList(this, test, orElse); 18252 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
18249 } 18253 }
18250 18254
18251 Map singleMatching(bool test(Map value)) { 18255 Map singleMatching(bool test(Map value)) {
18252 return Collections.singleMatching(this, test); 18256 return IterableMixinWorkaround.singleMatching(this, test);
18253 } 18257 }
18254 18258
18255 Map elementAt(int index) { 18259 Map elementAt(int index) {
18256 return this[index]; 18260 return this[index];
18257 } 18261 }
18258 18262
18259 // From Collection<Map>: 18263 // From Collection<Map>:
18260 18264
18261 void add(Map value) { 18265 void add(Map value) {
18262 throw new UnsupportedError("Cannot add to immutable List."); 18266 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
18300 if (this.length > 0) return this[this.length - 1]; 18304 if (this.length > 0) return this[this.length - 1];
18301 throw new StateError("No elements"); 18305 throw new StateError("No elements");
18302 } 18306 }
18303 18307
18304 Map get single { 18308 Map get single {
18305 if (length == 1) return this[0]; 18309 if (length == 1) return this[0];
18306 if (length == 0) throw new StateError("No elements"); 18310 if (length == 0) throw new StateError("No elements");
18307 throw new StateError("More than one element"); 18311 throw new StateError("More than one element");
18308 } 18312 }
18309 18313
18310 Map min([int compare(Map a, Map b)]) => Collections.min(this, compare); 18314 Map min([int compare(Map a, Map b)]) => IterableMixinWorkaround.min(this, comp are);
18311 18315
18312 Map max([int compare(Map a, Map b)]) => Collections.max(this, compare); 18316 Map max([int compare(Map a, Map b)]) => IterableMixinWorkaround.max(this, comp are);
18313 18317
18314 Map removeAt(int pos) { 18318 Map removeAt(int pos) {
18315 throw new UnsupportedError("Cannot removeAt on immutable List."); 18319 throw new UnsupportedError("Cannot removeAt on immutable List.");
18316 } 18320 }
18317 18321
18318 Map removeLast() { 18322 Map removeLast() {
18319 throw new UnsupportedError("Cannot removeLast on immutable List."); 18323 throw new UnsupportedError("Cannot removeLast on immutable List.");
18320 } 18324 }
18321 18325
18322 void setRange(int start, int rangeLength, List<Map> from, [int startFrom]) { 18326 void setRange(int start, int rangeLength, List<Map> from, [int startFrom]) {
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
19101 // From Iterable<TextTrackCue>: 19105 // From Iterable<TextTrackCue>:
19102 19106
19103 Iterator<TextTrackCue> get iterator { 19107 Iterator<TextTrackCue> get iterator {
19104 // Note: NodeLists are not fixed size. And most probably length shouldn't 19108 // Note: NodeLists are not fixed size. And most probably length shouldn't
19105 // be cached in both iterator _and_ forEach method. For now caching it 19109 // be cached in both iterator _and_ forEach method. For now caching it
19106 // for consistency. 19110 // for consistency.
19107 return new FixedSizeListIterator<TextTrackCue>(this); 19111 return new FixedSizeListIterator<TextTrackCue>(this);
19108 } 19112 }
19109 19113
19110 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, TextTrackCue)) { 19114 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, TextTrackCue)) {
19111 return Collections.reduce(this, initialValue, combine); 19115 return IterableMixinWorkaround.reduce(this, initialValue, combine);
19112 } 19116 }
19113 19117
19114 bool contains(TextTrackCue element) => Collections.contains(this, element); 19118 bool contains(TextTrackCue element) => IterableMixinWorkaround.contains(this, element);
19115 19119
19116 void forEach(void f(TextTrackCue element)) => Collections.forEach(this, f); 19120 void forEach(void f(TextTrackCue element)) => IterableMixinWorkaround.forEach( this, f);
19117 19121
19118 String join([String separator]) => Collections.joinList(this, separator); 19122 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
19119 19123
19120 List mappedBy(f(TextTrackCue element)) => new MappedList<TextTrackCue, dynamic >(this, f); 19124 List mappedBy(f(TextTrackCue element)) => IterableMixinWorkaround.mappedByList (this, f);
19121 19125
19122 Iterable<TextTrackCue> where(bool f(TextTrackCue element)) => new WhereIterabl e<TextTrackCue>(this, f); 19126 Iterable<TextTrackCue> where(bool f(TextTrackCue element)) => IterableMixinWor karound.where(this, f);
19123 19127
19124 bool every(bool f(TextTrackCue element)) => Collections.every(this, f); 19128 bool every(bool f(TextTrackCue element)) => IterableMixinWorkaround.every(this , f);
19125 19129
19126 bool any(bool f(TextTrackCue element)) => Collections.any(this, f); 19130 bool any(bool f(TextTrackCue element)) => IterableMixinWorkaround.any(this, f) ;
19127 19131
19128 List<TextTrackCue> toList() => new List<TextTrackCue>.from(this); 19132 List<TextTrackCue> toList() => new List<TextTrackCue>.from(this);
19129 Set<TextTrackCue> toSet() => new Set<TextTrackCue>.from(this); 19133 Set<TextTrackCue> toSet() => new Set<TextTrackCue>.from(this);
19130 19134
19131 bool get isEmpty => this.length == 0; 19135 bool get isEmpty => this.length == 0;
19132 19136
19133 List<TextTrackCue> take(int n) => new ListView<TextTrackCue>(this, 0, n); 19137 List<TextTrackCue> take(int n) => IterableMixinWorkaround.takeList(this, n);
19134 19138
19135 Iterable<TextTrackCue> takeWhile(bool test(TextTrackCue value)) { 19139 Iterable<TextTrackCue> takeWhile(bool test(TextTrackCue value)) {
19136 return new TakeWhileIterable<TextTrackCue>(this, test); 19140 return IterableMixinWorkaround.takeWhile(this, test);
19137 } 19141 }
19138 19142
19139 List<TextTrackCue> skip(int n) => new ListView<TextTrackCue>(this, n, null); 19143 List<TextTrackCue> skip(int n) => IterableMixinWorkaround.skipList(this, n);
19140 19144
19141 Iterable<TextTrackCue> skipWhile(bool test(TextTrackCue value)) { 19145 Iterable<TextTrackCue> skipWhile(bool test(TextTrackCue value)) {
19142 return new SkipWhileIterable<TextTrackCue>(this, test); 19146 return IterableMixinWorkaround.skipWhile(this, test);
19143 } 19147 }
19144 19148
19145 TextTrackCue firstMatching(bool test(TextTrackCue value), { TextTrackCue orEls e() }) { 19149 TextTrackCue firstMatching(bool test(TextTrackCue value), { TextTrackCue orEls e() }) {
19146 return Collections.firstMatching(this, test, orElse); 19150 return IterableMixinWorkaround.firstMatching(this, test, orElse);
19147 } 19151 }
19148 19152
19149 TextTrackCue lastMatching(bool test(TextTrackCue value), {TextTrackCue orElse( )}) { 19153 TextTrackCue lastMatching(bool test(TextTrackCue value), {TextTrackCue orElse( )}) {
19150 return Collections.lastMatchingInList(this, test, orElse); 19154 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
19151 } 19155 }
19152 19156
19153 TextTrackCue singleMatching(bool test(TextTrackCue value)) { 19157 TextTrackCue singleMatching(bool test(TextTrackCue value)) {
19154 return Collections.singleMatching(this, test); 19158 return IterableMixinWorkaround.singleMatching(this, test);
19155 } 19159 }
19156 19160
19157 TextTrackCue elementAt(int index) { 19161 TextTrackCue elementAt(int index) {
19158 return this[index]; 19162 return this[index];
19159 } 19163 }
19160 19164
19161 // From Collection<TextTrackCue>: 19165 // From Collection<TextTrackCue>:
19162 19166
19163 void add(TextTrackCue value) { 19167 void add(TextTrackCue value) {
19164 throw new UnsupportedError("Cannot add to immutable List."); 19168 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
19202 if (this.length > 0) return this[this.length - 1]; 19206 if (this.length > 0) return this[this.length - 1];
19203 throw new StateError("No elements"); 19207 throw new StateError("No elements");
19204 } 19208 }
19205 19209
19206 TextTrackCue get single { 19210 TextTrackCue get single {
19207 if (length == 1) return this[0]; 19211 if (length == 1) return this[0];
19208 if (length == 0) throw new StateError("No elements"); 19212 if (length == 0) throw new StateError("No elements");
19209 throw new StateError("More than one element"); 19213 throw new StateError("More than one element");
19210 } 19214 }
19211 19215
19212 TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) => Collections .min(this, compare); 19216 TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) => IterableMix inWorkaround.min(this, compare);
19213 19217
19214 TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) => Collections .max(this, compare); 19218 TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) => IterableMix inWorkaround.max(this, compare);
19215 19219
19216 TextTrackCue removeAt(int pos) { 19220 TextTrackCue removeAt(int pos) {
19217 throw new UnsupportedError("Cannot removeAt on immutable List."); 19221 throw new UnsupportedError("Cannot removeAt on immutable List.");
19218 } 19222 }
19219 19223
19220 TextTrackCue removeLast() { 19224 TextTrackCue removeLast() {
19221 throw new UnsupportedError("Cannot removeLast on immutable List."); 19225 throw new UnsupportedError("Cannot removeLast on immutable List.");
19222 } 19226 }
19223 19227
19224 void setRange(int start, int rangeLength, List<TextTrackCue> from, [int startF rom]) { 19228 void setRange(int start, int rangeLength, List<TextTrackCue> from, [int startF rom]) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
19275 // From Iterable<TextTrack>: 19279 // From Iterable<TextTrack>:
19276 19280
19277 Iterator<TextTrack> get iterator { 19281 Iterator<TextTrack> get iterator {
19278 // Note: NodeLists are not fixed size. And most probably length shouldn't 19282 // Note: NodeLists are not fixed size. And most probably length shouldn't
19279 // be cached in both iterator _and_ forEach method. For now caching it 19283 // be cached in both iterator _and_ forEach method. For now caching it
19280 // for consistency. 19284 // for consistency.
19281 return new FixedSizeListIterator<TextTrack>(this); 19285 return new FixedSizeListIterator<TextTrack>(this);
19282 } 19286 }
19283 19287
19284 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, TextTrack)) { 19288 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, TextTrack)) {
19285 return Collections.reduce(this, initialValue, combine); 19289 return IterableMixinWorkaround.reduce(this, initialValue, combine);
19286 } 19290 }
19287 19291
19288 bool contains(TextTrack element) => Collections.contains(this, element); 19292 bool contains(TextTrack element) => IterableMixinWorkaround.contains(this, ele ment);
19289 19293
19290 void forEach(void f(TextTrack element)) => Collections.forEach(this, f); 19294 void forEach(void f(TextTrack element)) => IterableMixinWorkaround.forEach(thi s, f);
19291 19295
19292 String join([String separator]) => Collections.joinList(this, separator); 19296 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
19293 19297
19294 List mappedBy(f(TextTrack element)) => new MappedList<TextTrack, dynamic>(this , f); 19298 List mappedBy(f(TextTrack element)) => IterableMixinWorkaround.mappedByList(th is, f);
19295 19299
19296 Iterable<TextTrack> where(bool f(TextTrack element)) => new WhereIterable<Text Track>(this, f); 19300 Iterable<TextTrack> where(bool f(TextTrack element)) => IterableMixinWorkaroun d.where(this, f);
19297 19301
19298 bool every(bool f(TextTrack element)) => Collections.every(this, f); 19302 bool every(bool f(TextTrack element)) => IterableMixinWorkaround.every(this, f );
19299 19303
19300 bool any(bool f(TextTrack element)) => Collections.any(this, f); 19304 bool any(bool f(TextTrack element)) => IterableMixinWorkaround.any(this, f);
19301 19305
19302 List<TextTrack> toList() => new List<TextTrack>.from(this); 19306 List<TextTrack> toList() => new List<TextTrack>.from(this);
19303 Set<TextTrack> toSet() => new Set<TextTrack>.from(this); 19307 Set<TextTrack> toSet() => new Set<TextTrack>.from(this);
19304 19308
19305 bool get isEmpty => this.length == 0; 19309 bool get isEmpty => this.length == 0;
19306 19310
19307 List<TextTrack> take(int n) => new ListView<TextTrack>(this, 0, n); 19311 List<TextTrack> take(int n) => IterableMixinWorkaround.takeList(this, n);
19308 19312
19309 Iterable<TextTrack> takeWhile(bool test(TextTrack value)) { 19313 Iterable<TextTrack> takeWhile(bool test(TextTrack value)) {
19310 return new TakeWhileIterable<TextTrack>(this, test); 19314 return IterableMixinWorkaround.takeWhile(this, test);
19311 } 19315 }
19312 19316
19313 List<TextTrack> skip(int n) => new ListView<TextTrack>(this, n, null); 19317 List<TextTrack> skip(int n) => IterableMixinWorkaround.skipList(this, n);
19314 19318
19315 Iterable<TextTrack> skipWhile(bool test(TextTrack value)) { 19319 Iterable<TextTrack> skipWhile(bool test(TextTrack value)) {
19316 return new SkipWhileIterable<TextTrack>(this, test); 19320 return IterableMixinWorkaround.skipWhile(this, test);
19317 } 19321 }
19318 19322
19319 TextTrack firstMatching(bool test(TextTrack value), { TextTrack orElse() }) { 19323 TextTrack firstMatching(bool test(TextTrack value), { TextTrack orElse() }) {
19320 return Collections.firstMatching(this, test, orElse); 19324 return IterableMixinWorkaround.firstMatching(this, test, orElse);
19321 } 19325 }
19322 19326
19323 TextTrack lastMatching(bool test(TextTrack value), {TextTrack orElse()}) { 19327 TextTrack lastMatching(bool test(TextTrack value), {TextTrack orElse()}) {
19324 return Collections.lastMatchingInList(this, test, orElse); 19328 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
19325 } 19329 }
19326 19330
19327 TextTrack singleMatching(bool test(TextTrack value)) { 19331 TextTrack singleMatching(bool test(TextTrack value)) {
19328 return Collections.singleMatching(this, test); 19332 return IterableMixinWorkaround.singleMatching(this, test);
19329 } 19333 }
19330 19334
19331 TextTrack elementAt(int index) { 19335 TextTrack elementAt(int index) {
19332 return this[index]; 19336 return this[index];
19333 } 19337 }
19334 19338
19335 // From Collection<TextTrack>: 19339 // From Collection<TextTrack>:
19336 19340
19337 void add(TextTrack value) { 19341 void add(TextTrack value) {
19338 throw new UnsupportedError("Cannot add to immutable List."); 19342 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
19376 if (this.length > 0) return this[this.length - 1]; 19380 if (this.length > 0) return this[this.length - 1];
19377 throw new StateError("No elements"); 19381 throw new StateError("No elements");
19378 } 19382 }
19379 19383
19380 TextTrack get single { 19384 TextTrack get single {
19381 if (length == 1) return this[0]; 19385 if (length == 1) return this[0];
19382 if (length == 0) throw new StateError("No elements"); 19386 if (length == 0) throw new StateError("No elements");
19383 throw new StateError("More than one element"); 19387 throw new StateError("More than one element");
19384 } 19388 }
19385 19389
19386 TextTrack min([int compare(TextTrack a, TextTrack b)]) => Collections.min(this , compare); 19390 TextTrack min([int compare(TextTrack a, TextTrack b)]) => IterableMixinWorkaro und.min(this, compare);
19387 19391
19388 TextTrack max([int compare(TextTrack a, TextTrack b)]) => Collections.max(this , compare); 19392 TextTrack max([int compare(TextTrack a, TextTrack b)]) => IterableMixinWorkaro und.max(this, compare);
19389 19393
19390 TextTrack removeAt(int pos) { 19394 TextTrack removeAt(int pos) {
19391 throw new UnsupportedError("Cannot removeAt on immutable List."); 19395 throw new UnsupportedError("Cannot removeAt on immutable List.");
19392 } 19396 }
19393 19397
19394 TextTrack removeLast() { 19398 TextTrack removeLast() {
19395 throw new UnsupportedError("Cannot removeLast on immutable List."); 19399 throw new UnsupportedError("Cannot removeLast on immutable List.");
19396 } 19400 }
19397 19401
19398 void setRange(int start, int rangeLength, List<TextTrack> from, [int startFrom ]) { 19402 void setRange(int start, int rangeLength, List<TextTrack> from, [int startFrom ]) {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
19584 // From Iterable<Touch>: 19588 // From Iterable<Touch>:
19585 19589
19586 Iterator<Touch> get iterator { 19590 Iterator<Touch> get iterator {
19587 // Note: NodeLists are not fixed size. And most probably length shouldn't 19591 // Note: NodeLists are not fixed size. And most probably length shouldn't
19588 // be cached in both iterator _and_ forEach method. For now caching it 19592 // be cached in both iterator _and_ forEach method. For now caching it
19589 // for consistency. 19593 // for consistency.
19590 return new FixedSizeListIterator<Touch>(this); 19594 return new FixedSizeListIterator<Touch>(this);
19591 } 19595 }
19592 19596
19593 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Touch)) { 19597 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Touch)) {
19594 return Collections.reduce(this, initialValue, combine); 19598 return IterableMixinWorkaround.reduce(this, initialValue, combine);
19595 } 19599 }
19596 19600
19597 bool contains(Touch element) => Collections.contains(this, element); 19601 bool contains(Touch element) => IterableMixinWorkaround.contains(this, element );
19598 19602
19599 void forEach(void f(Touch element)) => Collections.forEach(this, f); 19603 void forEach(void f(Touch element)) => IterableMixinWorkaround.forEach(this, f );
19600 19604
19601 String join([String separator]) => Collections.joinList(this, separator); 19605 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
19602 19606
19603 List mappedBy(f(Touch element)) => new MappedList<Touch, dynamic>(this, f); 19607 List mappedBy(f(Touch element)) => IterableMixinWorkaround.mappedByList(this, f);
19604 19608
19605 Iterable<Touch> where(bool f(Touch element)) => new WhereIterable<Touch>(this, f); 19609 Iterable<Touch> where(bool f(Touch element)) => IterableMixinWorkaround.where( this, f);
19606 19610
19607 bool every(bool f(Touch element)) => Collections.every(this, f); 19611 bool every(bool f(Touch element)) => IterableMixinWorkaround.every(this, f);
19608 19612
19609 bool any(bool f(Touch element)) => Collections.any(this, f); 19613 bool any(bool f(Touch element)) => IterableMixinWorkaround.any(this, f);
19610 19614
19611 List<Touch> toList() => new List<Touch>.from(this); 19615 List<Touch> toList() => new List<Touch>.from(this);
19612 Set<Touch> toSet() => new Set<Touch>.from(this); 19616 Set<Touch> toSet() => new Set<Touch>.from(this);
19613 19617
19614 bool get isEmpty => this.length == 0; 19618 bool get isEmpty => this.length == 0;
19615 19619
19616 List<Touch> take(int n) => new ListView<Touch>(this, 0, n); 19620 List<Touch> take(int n) => IterableMixinWorkaround.takeList(this, n);
19617 19621
19618 Iterable<Touch> takeWhile(bool test(Touch value)) { 19622 Iterable<Touch> takeWhile(bool test(Touch value)) {
19619 return new TakeWhileIterable<Touch>(this, test); 19623 return IterableMixinWorkaround.takeWhile(this, test);
19620 } 19624 }
19621 19625
19622 List<Touch> skip(int n) => new ListView<Touch>(this, n, null); 19626 List<Touch> skip(int n) => IterableMixinWorkaround.skipList(this, n);
19623 19627
19624 Iterable<Touch> skipWhile(bool test(Touch value)) { 19628 Iterable<Touch> skipWhile(bool test(Touch value)) {
19625 return new SkipWhileIterable<Touch>(this, test); 19629 return IterableMixinWorkaround.skipWhile(this, test);
19626 } 19630 }
19627 19631
19628 Touch firstMatching(bool test(Touch value), { Touch orElse() }) { 19632 Touch firstMatching(bool test(Touch value), { Touch orElse() }) {
19629 return Collections.firstMatching(this, test, orElse); 19633 return IterableMixinWorkaround.firstMatching(this, test, orElse);
19630 } 19634 }
19631 19635
19632 Touch lastMatching(bool test(Touch value), {Touch orElse()}) { 19636 Touch lastMatching(bool test(Touch value), {Touch orElse()}) {
19633 return Collections.lastMatchingInList(this, test, orElse); 19637 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
19634 } 19638 }
19635 19639
19636 Touch singleMatching(bool test(Touch value)) { 19640 Touch singleMatching(bool test(Touch value)) {
19637 return Collections.singleMatching(this, test); 19641 return IterableMixinWorkaround.singleMatching(this, test);
19638 } 19642 }
19639 19643
19640 Touch elementAt(int index) { 19644 Touch elementAt(int index) {
19641 return this[index]; 19645 return this[index];
19642 } 19646 }
19643 19647
19644 // From Collection<Touch>: 19648 // From Collection<Touch>:
19645 19649
19646 void add(Touch value) { 19650 void add(Touch value) {
19647 throw new UnsupportedError("Cannot add to immutable List."); 19651 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
19685 if (this.length > 0) return this[this.length - 1]; 19689 if (this.length > 0) return this[this.length - 1];
19686 throw new StateError("No elements"); 19690 throw new StateError("No elements");
19687 } 19691 }
19688 19692
19689 Touch get single { 19693 Touch get single {
19690 if (length == 1) return this[0]; 19694 if (length == 1) return this[0];
19691 if (length == 0) throw new StateError("No elements"); 19695 if (length == 0) throw new StateError("No elements");
19692 throw new StateError("More than one element"); 19696 throw new StateError("More than one element");
19693 } 19697 }
19694 19698
19695 Touch min([int compare(Touch a, Touch b)]) => Collections.min(this, compare); 19699 Touch min([int compare(Touch a, Touch b)]) => IterableMixinWorkaround.min(this , compare);
19696 19700
19697 Touch max([int compare(Touch a, Touch b)]) => Collections.max(this, compare); 19701 Touch max([int compare(Touch a, Touch b)]) => IterableMixinWorkaround.max(this , compare);
19698 19702
19699 Touch removeAt(int pos) { 19703 Touch removeAt(int pos) {
19700 throw new UnsupportedError("Cannot removeAt on immutable List."); 19704 throw new UnsupportedError("Cannot removeAt on immutable List.");
19701 } 19705 }
19702 19706
19703 Touch removeLast() { 19707 Touch removeLast() {
19704 throw new UnsupportedError("Cannot removeLast on immutable List."); 19708 throw new UnsupportedError("Cannot removeLast on immutable List.");
19705 } 19709 }
19706 19710
19707 void setRange(int start, int rangeLength, List<Touch> from, [int startFrom]) { 19711 void setRange(int start, int rangeLength, List<Touch> from, [int startFrom]) {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
19952 // From Iterable<int>: 19956 // From Iterable<int>:
19953 19957
19954 Iterator<int> get iterator { 19958 Iterator<int> get iterator {
19955 // Note: NodeLists are not fixed size. And most probably length shouldn't 19959 // Note: NodeLists are not fixed size. And most probably length shouldn't
19956 // be cached in both iterator _and_ forEach method. For now caching it 19960 // be cached in both iterator _and_ forEach method. For now caching it
19957 // for consistency. 19961 // for consistency.
19958 return new FixedSizeListIterator<int>(this); 19962 return new FixedSizeListIterator<int>(this);
19959 } 19963 }
19960 19964
19961 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) { 19965 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
19962 return Collections.reduce(this, initialValue, combine); 19966 return IterableMixinWorkaround.reduce(this, initialValue, combine);
19963 } 19967 }
19964 19968
19965 bool contains(int element) => Collections.contains(this, element); 19969 bool contains(int element) => IterableMixinWorkaround.contains(this, element);
19966 19970
19967 void forEach(void f(int element)) => Collections.forEach(this, f); 19971 void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
19968 19972
19969 String join([String separator]) => Collections.joinList(this, separator); 19973 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
19970 19974
19971 List mappedBy(f(int element)) => new MappedList<int, dynamic>(this, f); 19975 List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f) ;
19972 19976
19973 Iterable<int> where(bool f(int element)) => new WhereIterable<int>(this, f); 19977 Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this , f);
19974 19978
19975 bool every(bool f(int element)) => Collections.every(this, f); 19979 bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
19976 19980
19977 bool any(bool f(int element)) => Collections.any(this, f); 19981 bool any(bool f(int element)) => IterableMixinWorkaround.any(this, f);
19978 19982
19979 List<int> toList() => new List<int>.from(this); 19983 List<int> toList() => new List<int>.from(this);
19980 Set<int> toSet() => new Set<int>.from(this); 19984 Set<int> toSet() => new Set<int>.from(this);
19981 19985
19982 bool get isEmpty => this.length == 0; 19986 bool get isEmpty => this.length == 0;
19983 19987
19984 List<int> take(int n) => new ListView<int>(this, 0, n); 19988 List<int> take(int n) => IterableMixinWorkaround.takeList(this, n);
19985 19989
19986 Iterable<int> takeWhile(bool test(int value)) { 19990 Iterable<int> takeWhile(bool test(int value)) {
19987 return new TakeWhileIterable<int>(this, test); 19991 return IterableMixinWorkaround.takeWhile(this, test);
19988 } 19992 }
19989 19993
19990 List<int> skip(int n) => new ListView<int>(this, n, null); 19994 List<int> skip(int n) => IterableMixinWorkaround.skipList(this, n);
19991 19995
19992 Iterable<int> skipWhile(bool test(int value)) { 19996 Iterable<int> skipWhile(bool test(int value)) {
19993 return new SkipWhileIterable<int>(this, test); 19997 return IterableMixinWorkaround.skipWhile(this, test);
19994 } 19998 }
19995 19999
19996 int firstMatching(bool test(int value), { int orElse() }) { 20000 int firstMatching(bool test(int value), { int orElse() }) {
19997 return Collections.firstMatching(this, test, orElse); 20001 return IterableMixinWorkaround.firstMatching(this, test, orElse);
19998 } 20002 }
19999 20003
20000 int lastMatching(bool test(int value), {int orElse()}) { 20004 int lastMatching(bool test(int value), {int orElse()}) {
20001 return Collections.lastMatchingInList(this, test, orElse); 20005 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
20002 } 20006 }
20003 20007
20004 int singleMatching(bool test(int value)) { 20008 int singleMatching(bool test(int value)) {
20005 return Collections.singleMatching(this, test); 20009 return IterableMixinWorkaround.singleMatching(this, test);
20006 } 20010 }
20007 20011
20008 int elementAt(int index) { 20012 int elementAt(int index) {
20009 return this[index]; 20013 return this[index];
20010 } 20014 }
20011 20015
20012 // From Collection<int>: 20016 // From Collection<int>:
20013 20017
20014 void add(int value) { 20018 void add(int value) {
20015 throw new UnsupportedError("Cannot add to immutable List."); 20019 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
20053 if (this.length > 0) return this[this.length - 1]; 20057 if (this.length > 0) return this[this.length - 1];
20054 throw new StateError("No elements"); 20058 throw new StateError("No elements");
20055 } 20059 }
20056 20060
20057 int get single { 20061 int get single {
20058 if (length == 1) return this[0]; 20062 if (length == 1) return this[0];
20059 if (length == 0) throw new StateError("No elements"); 20063 if (length == 0) throw new StateError("No elements");
20060 throw new StateError("More than one element"); 20064 throw new StateError("More than one element");
20061 } 20065 }
20062 20066
20063 int min([int compare(int a, int b)]) => Collections.min(this, compare); 20067 int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, comp are);
20064 20068
20065 int max([int compare(int a, int b)]) => Collections.max(this, compare); 20069 int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, comp are);
20066 20070
20067 int removeAt(int pos) { 20071 int removeAt(int pos) {
20068 throw new UnsupportedError("Cannot removeAt on immutable List."); 20072 throw new UnsupportedError("Cannot removeAt on immutable List.");
20069 } 20073 }
20070 20074
20071 int removeLast() { 20075 int removeLast() {
20072 throw new UnsupportedError("Cannot removeLast on immutable List."); 20076 throw new UnsupportedError("Cannot removeLast on immutable List.");
20073 } 20077 }
20074 20078
20075 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { 20079 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
20128 // From Iterable<int>: 20132 // From Iterable<int>:
20129 20133
20130 Iterator<int> get iterator { 20134 Iterator<int> get iterator {
20131 // Note: NodeLists are not fixed size. And most probably length shouldn't 20135 // Note: NodeLists are not fixed size. And most probably length shouldn't
20132 // be cached in both iterator _and_ forEach method. For now caching it 20136 // be cached in both iterator _and_ forEach method. For now caching it
20133 // for consistency. 20137 // for consistency.
20134 return new FixedSizeListIterator<int>(this); 20138 return new FixedSizeListIterator<int>(this);
20135 } 20139 }
20136 20140
20137 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) { 20141 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
20138 return Collections.reduce(this, initialValue, combine); 20142 return IterableMixinWorkaround.reduce(this, initialValue, combine);
20139 } 20143 }
20140 20144
20141 bool contains(int element) => Collections.contains(this, element); 20145 bool contains(int element) => IterableMixinWorkaround.contains(this, element);
20142 20146
20143 void forEach(void f(int element)) => Collections.forEach(this, f); 20147 void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
20144 20148
20145 String join([String separator]) => Collections.joinList(this, separator); 20149 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
20146 20150
20147 List mappedBy(f(int element)) => new MappedList<int, dynamic>(this, f); 20151 List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f) ;
20148 20152
20149 Iterable<int> where(bool f(int element)) => new WhereIterable<int>(this, f); 20153 Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this , f);
20150 20154
20151 bool every(bool f(int element)) => Collections.every(this, f); 20155 bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
20152 20156
20153 bool any(bool f(int element)) => Collections.any(this, f); 20157 bool any(bool f(int element)) => IterableMixinWorkaround.any(this, f);
20154 20158
20155 List<int> toList() => new List<int>.from(this); 20159 List<int> toList() => new List<int>.from(this);
20156 Set<int> toSet() => new Set<int>.from(this); 20160 Set<int> toSet() => new Set<int>.from(this);
20157 20161
20158 bool get isEmpty => this.length == 0; 20162 bool get isEmpty => this.length == 0;
20159 20163
20160 List<int> take(int n) => new ListView<int>(this, 0, n); 20164 List<int> take(int n) => IterableMixinWorkaround.takeList(this, n);
20161 20165
20162 Iterable<int> takeWhile(bool test(int value)) { 20166 Iterable<int> takeWhile(bool test(int value)) {
20163 return new TakeWhileIterable<int>(this, test); 20167 return IterableMixinWorkaround.takeWhile(this, test);
20164 } 20168 }
20165 20169
20166 List<int> skip(int n) => new ListView<int>(this, n, null); 20170 List<int> skip(int n) => IterableMixinWorkaround.skipList(this, n);
20167 20171
20168 Iterable<int> skipWhile(bool test(int value)) { 20172 Iterable<int> skipWhile(bool test(int value)) {
20169 return new SkipWhileIterable<int>(this, test); 20173 return IterableMixinWorkaround.skipWhile(this, test);
20170 } 20174 }
20171 20175
20172 int firstMatching(bool test(int value), { int orElse() }) { 20176 int firstMatching(bool test(int value), { int orElse() }) {
20173 return Collections.firstMatching(this, test, orElse); 20177 return IterableMixinWorkaround.firstMatching(this, test, orElse);
20174 } 20178 }
20175 20179
20176 int lastMatching(bool test(int value), {int orElse()}) { 20180 int lastMatching(bool test(int value), {int orElse()}) {
20177 return Collections.lastMatchingInList(this, test, orElse); 20181 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
20178 } 20182 }
20179 20183
20180 int singleMatching(bool test(int value)) { 20184 int singleMatching(bool test(int value)) {
20181 return Collections.singleMatching(this, test); 20185 return IterableMixinWorkaround.singleMatching(this, test);
20182 } 20186 }
20183 20187
20184 int elementAt(int index) { 20188 int elementAt(int index) {
20185 return this[index]; 20189 return this[index];
20186 } 20190 }
20187 20191
20188 // From Collection<int>: 20192 // From Collection<int>:
20189 20193
20190 void add(int value) { 20194 void add(int value) {
20191 throw new UnsupportedError("Cannot add to immutable List."); 20195 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
20229 if (this.length > 0) return this[this.length - 1]; 20233 if (this.length > 0) return this[this.length - 1];
20230 throw new StateError("No elements"); 20234 throw new StateError("No elements");
20231 } 20235 }
20232 20236
20233 int get single { 20237 int get single {
20234 if (length == 1) return this[0]; 20238 if (length == 1) return this[0];
20235 if (length == 0) throw new StateError("No elements"); 20239 if (length == 0) throw new StateError("No elements");
20236 throw new StateError("More than one element"); 20240 throw new StateError("More than one element");
20237 } 20241 }
20238 20242
20239 int min([int compare(int a, int b)]) => Collections.min(this, compare); 20243 int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, comp are);
20240 20244
20241 int max([int compare(int a, int b)]) => Collections.max(this, compare); 20245 int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, comp are);
20242 20246
20243 int removeAt(int pos) { 20247 int removeAt(int pos) {
20244 throw new UnsupportedError("Cannot removeAt on immutable List."); 20248 throw new UnsupportedError("Cannot removeAt on immutable List.");
20245 } 20249 }
20246 20250
20247 int removeLast() { 20251 int removeLast() {
20248 throw new UnsupportedError("Cannot removeLast on immutable List."); 20252 throw new UnsupportedError("Cannot removeLast on immutable List.");
20249 } 20253 }
20250 20254
20251 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { 20255 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
20304 // From Iterable<int>: 20308 // From Iterable<int>:
20305 20309
20306 Iterator<int> get iterator { 20310 Iterator<int> get iterator {
20307 // Note: NodeLists are not fixed size. And most probably length shouldn't 20311 // Note: NodeLists are not fixed size. And most probably length shouldn't
20308 // be cached in both iterator _and_ forEach method. For now caching it 20312 // be cached in both iterator _and_ forEach method. For now caching it
20309 // for consistency. 20313 // for consistency.
20310 return new FixedSizeListIterator<int>(this); 20314 return new FixedSizeListIterator<int>(this);
20311 } 20315 }
20312 20316
20313 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) { 20317 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
20314 return Collections.reduce(this, initialValue, combine); 20318 return IterableMixinWorkaround.reduce(this, initialValue, combine);
20315 } 20319 }
20316 20320
20317 bool contains(int element) => Collections.contains(this, element); 20321 bool contains(int element) => IterableMixinWorkaround.contains(this, element);
20318 20322
20319 void forEach(void f(int element)) => Collections.forEach(this, f); 20323 void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
20320 20324
20321 String join([String separator]) => Collections.joinList(this, separator); 20325 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
20322 20326
20323 List mappedBy(f(int element)) => new MappedList<int, dynamic>(this, f); 20327 List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f) ;
20324 20328
20325 Iterable<int> where(bool f(int element)) => new WhereIterable<int>(this, f); 20329 Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this , f);
20326 20330
20327 bool every(bool f(int element)) => Collections.every(this, f); 20331 bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
20328 20332
20329 bool any(bool f(int element)) => Collections.any(this, f); 20333 bool any(bool f(int element)) => IterableMixinWorkaround.any(this, f);
20330 20334
20331 List<int> toList() => new List<int>.from(this); 20335 List<int> toList() => new List<int>.from(this);
20332 Set<int> toSet() => new Set<int>.from(this); 20336 Set<int> toSet() => new Set<int>.from(this);
20333 20337
20334 bool get isEmpty => this.length == 0; 20338 bool get isEmpty => this.length == 0;
20335 20339
20336 List<int> take(int n) => new ListView<int>(this, 0, n); 20340 List<int> take(int n) => IterableMixinWorkaround.takeList(this, n);
20337 20341
20338 Iterable<int> takeWhile(bool test(int value)) { 20342 Iterable<int> takeWhile(bool test(int value)) {
20339 return new TakeWhileIterable<int>(this, test); 20343 return IterableMixinWorkaround.takeWhile(this, test);
20340 } 20344 }
20341 20345
20342 List<int> skip(int n) => new ListView<int>(this, n, null); 20346 List<int> skip(int n) => IterableMixinWorkaround.skipList(this, n);
20343 20347
20344 Iterable<int> skipWhile(bool test(int value)) { 20348 Iterable<int> skipWhile(bool test(int value)) {
20345 return new SkipWhileIterable<int>(this, test); 20349 return IterableMixinWorkaround.skipWhile(this, test);
20346 } 20350 }
20347 20351
20348 int firstMatching(bool test(int value), { int orElse() }) { 20352 int firstMatching(bool test(int value), { int orElse() }) {
20349 return Collections.firstMatching(this, test, orElse); 20353 return IterableMixinWorkaround.firstMatching(this, test, orElse);
20350 } 20354 }
20351 20355
20352 int lastMatching(bool test(int value), {int orElse()}) { 20356 int lastMatching(bool test(int value), {int orElse()}) {
20353 return Collections.lastMatchingInList(this, test, orElse); 20357 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
20354 } 20358 }
20355 20359
20356 int singleMatching(bool test(int value)) { 20360 int singleMatching(bool test(int value)) {
20357 return Collections.singleMatching(this, test); 20361 return IterableMixinWorkaround.singleMatching(this, test);
20358 } 20362 }
20359 20363
20360 int elementAt(int index) { 20364 int elementAt(int index) {
20361 return this[index]; 20365 return this[index];
20362 } 20366 }
20363 20367
20364 // From Collection<int>: 20368 // From Collection<int>:
20365 20369
20366 void add(int value) { 20370 void add(int value) {
20367 throw new UnsupportedError("Cannot add to immutable List."); 20371 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
20405 if (this.length > 0) return this[this.length - 1]; 20409 if (this.length > 0) return this[this.length - 1];
20406 throw new StateError("No elements"); 20410 throw new StateError("No elements");
20407 } 20411 }
20408 20412
20409 int get single { 20413 int get single {
20410 if (length == 1) return this[0]; 20414 if (length == 1) return this[0];
20411 if (length == 0) throw new StateError("No elements"); 20415 if (length == 0) throw new StateError("No elements");
20412 throw new StateError("More than one element"); 20416 throw new StateError("More than one element");
20413 } 20417 }
20414 20418
20415 int min([int compare(int a, int b)]) => Collections.min(this, compare); 20419 int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, comp are);
20416 20420
20417 int max([int compare(int a, int b)]) => Collections.max(this, compare); 20421 int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, comp are);
20418 20422
20419 int removeAt(int pos) { 20423 int removeAt(int pos) {
20420 throw new UnsupportedError("Cannot removeAt on immutable List."); 20424 throw new UnsupportedError("Cannot removeAt on immutable List.");
20421 } 20425 }
20422 20426
20423 int removeLast() { 20427 int removeLast() {
20424 throw new UnsupportedError("Cannot removeLast on immutable List."); 20428 throw new UnsupportedError("Cannot removeLast on immutable List.");
20425 } 20429 }
20426 20430
20427 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { 20431 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
20478 // From Iterable<int>: 20482 // From Iterable<int>:
20479 20483
20480 Iterator<int> get iterator { 20484 Iterator<int> get iterator {
20481 // Note: NodeLists are not fixed size. And most probably length shouldn't 20485 // Note: NodeLists are not fixed size. And most probably length shouldn't
20482 // be cached in both iterator _and_ forEach method. For now caching it 20486 // be cached in both iterator _and_ forEach method. For now caching it
20483 // for consistency. 20487 // for consistency.
20484 return new FixedSizeListIterator<int>(this); 20488 return new FixedSizeListIterator<int>(this);
20485 } 20489 }
20486 20490
20487 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) { 20491 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
20488 return Collections.reduce(this, initialValue, combine); 20492 return IterableMixinWorkaround.reduce(this, initialValue, combine);
20489 } 20493 }
20490 20494
20491 bool contains(int element) => Collections.contains(this, element); 20495 bool contains(int element) => IterableMixinWorkaround.contains(this, element);
20492 20496
20493 void forEach(void f(int element)) => Collections.forEach(this, f); 20497 void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
20494 20498
20495 String join([String separator]) => Collections.joinList(this, separator); 20499 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
20496 20500
20497 List mappedBy(f(int element)) => new MappedList<int, dynamic>(this, f); 20501 List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f) ;
20498 20502
20499 Iterable<int> where(bool f(int element)) => new WhereIterable<int>(this, f); 20503 Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this , f);
20500 20504
20501 bool every(bool f(int element)) => Collections.every(this, f); 20505 bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
20502 20506
20503 bool any(bool f(int element)) => Collections.any(this, f); 20507 bool any(bool f(int element)) => IterableMixinWorkaround.any(this, f);
20504 20508
20505 List<int> toList() => new List<int>.from(this); 20509 List<int> toList() => new List<int>.from(this);
20506 Set<int> toSet() => new Set<int>.from(this); 20510 Set<int> toSet() => new Set<int>.from(this);
20507 20511
20508 bool get isEmpty => this.length == 0; 20512 bool get isEmpty => this.length == 0;
20509 20513
20510 List<int> take(int n) => new ListView<int>(this, 0, n); 20514 List<int> take(int n) => IterableMixinWorkaround.takeList(this, n);
20511 20515
20512 Iterable<int> takeWhile(bool test(int value)) { 20516 Iterable<int> takeWhile(bool test(int value)) {
20513 return new TakeWhileIterable<int>(this, test); 20517 return IterableMixinWorkaround.takeWhile(this, test);
20514 } 20518 }
20515 20519
20516 List<int> skip(int n) => new ListView<int>(this, n, null); 20520 List<int> skip(int n) => IterableMixinWorkaround.skipList(this, n);
20517 20521
20518 Iterable<int> skipWhile(bool test(int value)) { 20522 Iterable<int> skipWhile(bool test(int value)) {
20519 return new SkipWhileIterable<int>(this, test); 20523 return IterableMixinWorkaround.skipWhile(this, test);
20520 } 20524 }
20521 20525
20522 int firstMatching(bool test(int value), { int orElse() }) { 20526 int firstMatching(bool test(int value), { int orElse() }) {
20523 return Collections.firstMatching(this, test, orElse); 20527 return IterableMixinWorkaround.firstMatching(this, test, orElse);
20524 } 20528 }
20525 20529
20526 int lastMatching(bool test(int value), {int orElse()}) { 20530 int lastMatching(bool test(int value), {int orElse()}) {
20527 return Collections.lastMatchingInList(this, test, orElse); 20531 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
20528 } 20532 }
20529 20533
20530 int singleMatching(bool test(int value)) { 20534 int singleMatching(bool test(int value)) {
20531 return Collections.singleMatching(this, test); 20535 return IterableMixinWorkaround.singleMatching(this, test);
20532 } 20536 }
20533 20537
20534 int elementAt(int index) { 20538 int elementAt(int index) {
20535 return this[index]; 20539 return this[index];
20536 } 20540 }
20537 20541
20538 // From Collection<int>: 20542 // From Collection<int>:
20539 20543
20540 void add(int value) { 20544 void add(int value) {
20541 throw new UnsupportedError("Cannot add to immutable List."); 20545 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
20579 if (this.length > 0) return this[this.length - 1]; 20583 if (this.length > 0) return this[this.length - 1];
20580 throw new StateError("No elements"); 20584 throw new StateError("No elements");
20581 } 20585 }
20582 20586
20583 int get single { 20587 int get single {
20584 if (length == 1) return this[0]; 20588 if (length == 1) return this[0];
20585 if (length == 0) throw new StateError("No elements"); 20589 if (length == 0) throw new StateError("No elements");
20586 throw new StateError("More than one element"); 20590 throw new StateError("More than one element");
20587 } 20591 }
20588 20592
20589 int min([int compare(int a, int b)]) => Collections.min(this, compare); 20593 int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, comp are);
20590 20594
20591 int max([int compare(int a, int b)]) => Collections.max(this, compare); 20595 int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, comp are);
20592 20596
20593 int removeAt(int pos) { 20597 int removeAt(int pos) {
20594 throw new UnsupportedError("Cannot removeAt on immutable List."); 20598 throw new UnsupportedError("Cannot removeAt on immutable List.");
20595 } 20599 }
20596 20600
20597 int removeLast() { 20601 int removeLast() {
20598 throw new UnsupportedError("Cannot removeLast on immutable List."); 20602 throw new UnsupportedError("Cannot removeLast on immutable List.");
20599 } 20603 }
20600 20604
20601 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { 20605 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
(...skipping 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after
23912 // From Iterable<ClientRect>: 23916 // From Iterable<ClientRect>:
23913 23917
23914 Iterator<ClientRect> get iterator { 23918 Iterator<ClientRect> get iterator {
23915 // Note: NodeLists are not fixed size. And most probably length shouldn't 23919 // Note: NodeLists are not fixed size. And most probably length shouldn't
23916 // be cached in both iterator _and_ forEach method. For now caching it 23920 // be cached in both iterator _and_ forEach method. For now caching it
23917 // for consistency. 23921 // for consistency.
23918 return new FixedSizeListIterator<ClientRect>(this); 23922 return new FixedSizeListIterator<ClientRect>(this);
23919 } 23923 }
23920 23924
23921 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, ClientRect)) { 23925 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, ClientRect)) {
23922 return Collections.reduce(this, initialValue, combine); 23926 return IterableMixinWorkaround.reduce(this, initialValue, combine);
23923 } 23927 }
23924 23928
23925 bool contains(ClientRect element) => Collections.contains(this, element); 23929 bool contains(ClientRect element) => IterableMixinWorkaround.contains(this, el ement);
23926 23930
23927 void forEach(void f(ClientRect element)) => Collections.forEach(this, f); 23931 void forEach(void f(ClientRect element)) => IterableMixinWorkaround.forEach(th is, f);
23928 23932
23929 String join([String separator]) => Collections.joinList(this, separator); 23933 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
23930 23934
23931 List mappedBy(f(ClientRect element)) => new MappedList<ClientRect, dynamic>(th is, f); 23935 List mappedBy(f(ClientRect element)) => IterableMixinWorkaround.mappedByList(t his, f);
23932 23936
23933 Iterable<ClientRect> where(bool f(ClientRect element)) => new WhereIterable<Cl ientRect>(this, f); 23937 Iterable<ClientRect> where(bool f(ClientRect element)) => IterableMixinWorkaro und.where(this, f);
23934 23938
23935 bool every(bool f(ClientRect element)) => Collections.every(this, f); 23939 bool every(bool f(ClientRect element)) => IterableMixinWorkaround.every(this, f);
23936 23940
23937 bool any(bool f(ClientRect element)) => Collections.any(this, f); 23941 bool any(bool f(ClientRect element)) => IterableMixinWorkaround.any(this, f);
23938 23942
23939 List<ClientRect> toList() => new List<ClientRect>.from(this); 23943 List<ClientRect> toList() => new List<ClientRect>.from(this);
23940 Set<ClientRect> toSet() => new Set<ClientRect>.from(this); 23944 Set<ClientRect> toSet() => new Set<ClientRect>.from(this);
23941 23945
23942 bool get isEmpty => this.length == 0; 23946 bool get isEmpty => this.length == 0;
23943 23947
23944 List<ClientRect> take(int n) => new ListView<ClientRect>(this, 0, n); 23948 List<ClientRect> take(int n) => IterableMixinWorkaround.takeList(this, n);
23945 23949
23946 Iterable<ClientRect> takeWhile(bool test(ClientRect value)) { 23950 Iterable<ClientRect> takeWhile(bool test(ClientRect value)) {
23947 return new TakeWhileIterable<ClientRect>(this, test); 23951 return IterableMixinWorkaround.takeWhile(this, test);
23948 } 23952 }
23949 23953
23950 List<ClientRect> skip(int n) => new ListView<ClientRect>(this, n, null); 23954 List<ClientRect> skip(int n) => IterableMixinWorkaround.skipList(this, n);
23951 23955
23952 Iterable<ClientRect> skipWhile(bool test(ClientRect value)) { 23956 Iterable<ClientRect> skipWhile(bool test(ClientRect value)) {
23953 return new SkipWhileIterable<ClientRect>(this, test); 23957 return IterableMixinWorkaround.skipWhile(this, test);
23954 } 23958 }
23955 23959
23956 ClientRect firstMatching(bool test(ClientRect value), { ClientRect orElse() }) { 23960 ClientRect firstMatching(bool test(ClientRect value), { ClientRect orElse() }) {
23957 return Collections.firstMatching(this, test, orElse); 23961 return IterableMixinWorkaround.firstMatching(this, test, orElse);
23958 } 23962 }
23959 23963
23960 ClientRect lastMatching(bool test(ClientRect value), {ClientRect orElse()}) { 23964 ClientRect lastMatching(bool test(ClientRect value), {ClientRect orElse()}) {
23961 return Collections.lastMatchingInList(this, test, orElse); 23965 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
23962 } 23966 }
23963 23967
23964 ClientRect singleMatching(bool test(ClientRect value)) { 23968 ClientRect singleMatching(bool test(ClientRect value)) {
23965 return Collections.singleMatching(this, test); 23969 return IterableMixinWorkaround.singleMatching(this, test);
23966 } 23970 }
23967 23971
23968 ClientRect elementAt(int index) { 23972 ClientRect elementAt(int index) {
23969 return this[index]; 23973 return this[index];
23970 } 23974 }
23971 23975
23972 // From Collection<ClientRect>: 23976 // From Collection<ClientRect>:
23973 23977
23974 void add(ClientRect value) { 23978 void add(ClientRect value) {
23975 throw new UnsupportedError("Cannot add to immutable List."); 23979 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
24013 if (this.length > 0) return this[this.length - 1]; 24017 if (this.length > 0) return this[this.length - 1];
24014 throw new StateError("No elements"); 24018 throw new StateError("No elements");
24015 } 24019 }
24016 24020
24017 ClientRect get single { 24021 ClientRect get single {
24018 if (length == 1) return this[0]; 24022 if (length == 1) return this[0];
24019 if (length == 0) throw new StateError("No elements"); 24023 if (length == 0) throw new StateError("No elements");
24020 throw new StateError("More than one element"); 24024 throw new StateError("More than one element");
24021 } 24025 }
24022 24026
24023 ClientRect min([int compare(ClientRect a, ClientRect b)]) => Collections.min(t his, compare); 24027 ClientRect min([int compare(ClientRect a, ClientRect b)]) => IterableMixinWork around.min(this, compare);
24024 24028
24025 ClientRect max([int compare(ClientRect a, ClientRect b)]) => Collections.max(t his, compare); 24029 ClientRect max([int compare(ClientRect a, ClientRect b)]) => IterableMixinWork around.max(this, compare);
24026 24030
24027 ClientRect removeAt(int pos) { 24031 ClientRect removeAt(int pos) {
24028 throw new UnsupportedError("Cannot removeAt on immutable List."); 24032 throw new UnsupportedError("Cannot removeAt on immutable List.");
24029 } 24033 }
24030 24034
24031 ClientRect removeLast() { 24035 ClientRect removeLast() {
24032 throw new UnsupportedError("Cannot removeLast on immutable List."); 24036 throw new UnsupportedError("Cannot removeLast on immutable List.");
24033 } 24037 }
24034 24038
24035 void setRange(int start, int rangeLength, List<ClientRect> from, [int startFro m]) { 24039 void setRange(int start, int rangeLength, List<ClientRect> from, [int startFro m]) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
24076 // From Iterable<CssRule>: 24080 // From Iterable<CssRule>:
24077 24081
24078 Iterator<CssRule> get iterator { 24082 Iterator<CssRule> get iterator {
24079 // Note: NodeLists are not fixed size. And most probably length shouldn't 24083 // Note: NodeLists are not fixed size. And most probably length shouldn't
24080 // be cached in both iterator _and_ forEach method. For now caching it 24084 // be cached in both iterator _and_ forEach method. For now caching it
24081 // for consistency. 24085 // for consistency.
24082 return new FixedSizeListIterator<CssRule>(this); 24086 return new FixedSizeListIterator<CssRule>(this);
24083 } 24087 }
24084 24088
24085 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, CssRule)) { 24089 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, CssRule)) {
24086 return Collections.reduce(this, initialValue, combine); 24090 return IterableMixinWorkaround.reduce(this, initialValue, combine);
24087 } 24091 }
24088 24092
24089 bool contains(CssRule element) => Collections.contains(this, element); 24093 bool contains(CssRule element) => IterableMixinWorkaround.contains(this, eleme nt);
24090 24094
24091 void forEach(void f(CssRule element)) => Collections.forEach(this, f); 24095 void forEach(void f(CssRule element)) => IterableMixinWorkaround.forEach(this, f);
24092 24096
24093 String join([String separator]) => Collections.joinList(this, separator); 24097 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
24094 24098
24095 List mappedBy(f(CssRule element)) => new MappedList<CssRule, dynamic>(this, f) ; 24099 List mappedBy(f(CssRule element)) => IterableMixinWorkaround.mappedByList(this , f);
24096 24100
24097 Iterable<CssRule> where(bool f(CssRule element)) => new WhereIterable<CssRule> (this, f); 24101 Iterable<CssRule> where(bool f(CssRule element)) => IterableMixinWorkaround.wh ere(this, f);
24098 24102
24099 bool every(bool f(CssRule element)) => Collections.every(this, f); 24103 bool every(bool f(CssRule element)) => IterableMixinWorkaround.every(this, f);
24100 24104
24101 bool any(bool f(CssRule element)) => Collections.any(this, f); 24105 bool any(bool f(CssRule element)) => IterableMixinWorkaround.any(this, f);
24102 24106
24103 List<CssRule> toList() => new List<CssRule>.from(this); 24107 List<CssRule> toList() => new List<CssRule>.from(this);
24104 Set<CssRule> toSet() => new Set<CssRule>.from(this); 24108 Set<CssRule> toSet() => new Set<CssRule>.from(this);
24105 24109
24106 bool get isEmpty => this.length == 0; 24110 bool get isEmpty => this.length == 0;
24107 24111
24108 List<CssRule> take(int n) => new ListView<CssRule>(this, 0, n); 24112 List<CssRule> take(int n) => IterableMixinWorkaround.takeList(this, n);
24109 24113
24110 Iterable<CssRule> takeWhile(bool test(CssRule value)) { 24114 Iterable<CssRule> takeWhile(bool test(CssRule value)) {
24111 return new TakeWhileIterable<CssRule>(this, test); 24115 return IterableMixinWorkaround.takeWhile(this, test);
24112 } 24116 }
24113 24117
24114 List<CssRule> skip(int n) => new ListView<CssRule>(this, n, null); 24118 List<CssRule> skip(int n) => IterableMixinWorkaround.skipList(this, n);
24115 24119
24116 Iterable<CssRule> skipWhile(bool test(CssRule value)) { 24120 Iterable<CssRule> skipWhile(bool test(CssRule value)) {
24117 return new SkipWhileIterable<CssRule>(this, test); 24121 return IterableMixinWorkaround.skipWhile(this, test);
24118 } 24122 }
24119 24123
24120 CssRule firstMatching(bool test(CssRule value), { CssRule orElse() }) { 24124 CssRule firstMatching(bool test(CssRule value), { CssRule orElse() }) {
24121 return Collections.firstMatching(this, test, orElse); 24125 return IterableMixinWorkaround.firstMatching(this, test, orElse);
24122 } 24126 }
24123 24127
24124 CssRule lastMatching(bool test(CssRule value), {CssRule orElse()}) { 24128 CssRule lastMatching(bool test(CssRule value), {CssRule orElse()}) {
24125 return Collections.lastMatchingInList(this, test, orElse); 24129 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
24126 } 24130 }
24127 24131
24128 CssRule singleMatching(bool test(CssRule value)) { 24132 CssRule singleMatching(bool test(CssRule value)) {
24129 return Collections.singleMatching(this, test); 24133 return IterableMixinWorkaround.singleMatching(this, test);
24130 } 24134 }
24131 24135
24132 CssRule elementAt(int index) { 24136 CssRule elementAt(int index) {
24133 return this[index]; 24137 return this[index];
24134 } 24138 }
24135 24139
24136 // From Collection<CssRule>: 24140 // From Collection<CssRule>:
24137 24141
24138 void add(CssRule value) { 24142 void add(CssRule value) {
24139 throw new UnsupportedError("Cannot add to immutable List."); 24143 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
24177 if (this.length > 0) return this[this.length - 1]; 24181 if (this.length > 0) return this[this.length - 1];
24178 throw new StateError("No elements"); 24182 throw new StateError("No elements");
24179 } 24183 }
24180 24184
24181 CssRule get single { 24185 CssRule get single {
24182 if (length == 1) return this[0]; 24186 if (length == 1) return this[0];
24183 if (length == 0) throw new StateError("No elements"); 24187 if (length == 0) throw new StateError("No elements");
24184 throw new StateError("More than one element"); 24188 throw new StateError("More than one element");
24185 } 24189 }
24186 24190
24187 CssRule min([int compare(CssRule a, CssRule b)]) => Collections.min(this, comp are); 24191 CssRule min([int compare(CssRule a, CssRule b)]) => IterableMixinWorkaround.mi n(this, compare);
24188 24192
24189 CssRule max([int compare(CssRule a, CssRule b)]) => Collections.max(this, comp are); 24193 CssRule max([int compare(CssRule a, CssRule b)]) => IterableMixinWorkaround.ma x(this, compare);
24190 24194
24191 CssRule removeAt(int pos) { 24195 CssRule removeAt(int pos) {
24192 throw new UnsupportedError("Cannot removeAt on immutable List."); 24196 throw new UnsupportedError("Cannot removeAt on immutable List.");
24193 } 24197 }
24194 24198
24195 CssRule removeLast() { 24199 CssRule removeLast() {
24196 throw new UnsupportedError("Cannot removeLast on immutable List."); 24200 throw new UnsupportedError("Cannot removeLast on immutable List.");
24197 } 24201 }
24198 24202
24199 void setRange(int start, int rangeLength, List<CssRule> from, [int startFrom]) { 24203 void setRange(int start, int rangeLength, List<CssRule> from, [int startFrom]) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
24240 // From Iterable<CssValue>: 24244 // From Iterable<CssValue>:
24241 24245
24242 Iterator<CssValue> get iterator { 24246 Iterator<CssValue> get iterator {
24243 // Note: NodeLists are not fixed size. And most probably length shouldn't 24247 // Note: NodeLists are not fixed size. And most probably length shouldn't
24244 // be cached in both iterator _and_ forEach method. For now caching it 24248 // be cached in both iterator _and_ forEach method. For now caching it
24245 // for consistency. 24249 // for consistency.
24246 return new FixedSizeListIterator<CssValue>(this); 24250 return new FixedSizeListIterator<CssValue>(this);
24247 } 24251 }
24248 24252
24249 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, CssValue)) { 24253 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, CssValue)) {
24250 return Collections.reduce(this, initialValue, combine); 24254 return IterableMixinWorkaround.reduce(this, initialValue, combine);
24251 } 24255 }
24252 24256
24253 bool contains(CssValue element) => Collections.contains(this, element); 24257 bool contains(CssValue element) => IterableMixinWorkaround.contains(this, elem ent);
24254 24258
24255 void forEach(void f(CssValue element)) => Collections.forEach(this, f); 24259 void forEach(void f(CssValue element)) => IterableMixinWorkaround.forEach(this , f);
24256 24260
24257 String join([String separator]) => Collections.joinList(this, separator); 24261 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
24258 24262
24259 List mappedBy(f(CssValue element)) => new MappedList<CssValue, dynamic>(this, f); 24263 List mappedBy(f(CssValue element)) => IterableMixinWorkaround.mappedByList(thi s, f);
24260 24264
24261 Iterable<CssValue> where(bool f(CssValue element)) => new WhereIterable<CssVal ue>(this, f); 24265 Iterable<CssValue> where(bool f(CssValue element)) => IterableMixinWorkaround. where(this, f);
24262 24266
24263 bool every(bool f(CssValue element)) => Collections.every(this, f); 24267 bool every(bool f(CssValue element)) => IterableMixinWorkaround.every(this, f) ;
24264 24268
24265 bool any(bool f(CssValue element)) => Collections.any(this, f); 24269 bool any(bool f(CssValue element)) => IterableMixinWorkaround.any(this, f);
24266 24270
24267 List<CssValue> toList() => new List<CssValue>.from(this); 24271 List<CssValue> toList() => new List<CssValue>.from(this);
24268 Set<CssValue> toSet() => new Set<CssValue>.from(this); 24272 Set<CssValue> toSet() => new Set<CssValue>.from(this);
24269 24273
24270 bool get isEmpty => this.length == 0; 24274 bool get isEmpty => this.length == 0;
24271 24275
24272 List<CssValue> take(int n) => new ListView<CssValue>(this, 0, n); 24276 List<CssValue> take(int n) => IterableMixinWorkaround.takeList(this, n);
24273 24277
24274 Iterable<CssValue> takeWhile(bool test(CssValue value)) { 24278 Iterable<CssValue> takeWhile(bool test(CssValue value)) {
24275 return new TakeWhileIterable<CssValue>(this, test); 24279 return IterableMixinWorkaround.takeWhile(this, test);
24276 } 24280 }
24277 24281
24278 List<CssValue> skip(int n) => new ListView<CssValue>(this, n, null); 24282 List<CssValue> skip(int n) => IterableMixinWorkaround.skipList(this, n);
24279 24283
24280 Iterable<CssValue> skipWhile(bool test(CssValue value)) { 24284 Iterable<CssValue> skipWhile(bool test(CssValue value)) {
24281 return new SkipWhileIterable<CssValue>(this, test); 24285 return IterableMixinWorkaround.skipWhile(this, test);
24282 } 24286 }
24283 24287
24284 CssValue firstMatching(bool test(CssValue value), { CssValue orElse() }) { 24288 CssValue firstMatching(bool test(CssValue value), { CssValue orElse() }) {
24285 return Collections.firstMatching(this, test, orElse); 24289 return IterableMixinWorkaround.firstMatching(this, test, orElse);
24286 } 24290 }
24287 24291
24288 CssValue lastMatching(bool test(CssValue value), {CssValue orElse()}) { 24292 CssValue lastMatching(bool test(CssValue value), {CssValue orElse()}) {
24289 return Collections.lastMatchingInList(this, test, orElse); 24293 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
24290 } 24294 }
24291 24295
24292 CssValue singleMatching(bool test(CssValue value)) { 24296 CssValue singleMatching(bool test(CssValue value)) {
24293 return Collections.singleMatching(this, test); 24297 return IterableMixinWorkaround.singleMatching(this, test);
24294 } 24298 }
24295 24299
24296 CssValue elementAt(int index) { 24300 CssValue elementAt(int index) {
24297 return this[index]; 24301 return this[index];
24298 } 24302 }
24299 24303
24300 // From Collection<CssValue>: 24304 // From Collection<CssValue>:
24301 24305
24302 void add(CssValue value) { 24306 void add(CssValue value) {
24303 throw new UnsupportedError("Cannot add to immutable List."); 24307 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
24341 if (this.length > 0) return this[this.length - 1]; 24345 if (this.length > 0) return this[this.length - 1];
24342 throw new StateError("No elements"); 24346 throw new StateError("No elements");
24343 } 24347 }
24344 24348
24345 CssValue get single { 24349 CssValue get single {
24346 if (length == 1) return this[0]; 24350 if (length == 1) return this[0];
24347 if (length == 0) throw new StateError("No elements"); 24351 if (length == 0) throw new StateError("No elements");
24348 throw new StateError("More than one element"); 24352 throw new StateError("More than one element");
24349 } 24353 }
24350 24354
24351 CssValue min([int compare(CssValue a, CssValue b)]) => Collections.min(this, c ompare); 24355 CssValue min([int compare(CssValue a, CssValue b)]) => IterableMixinWorkaround .min(this, compare);
24352 24356
24353 CssValue max([int compare(CssValue a, CssValue b)]) => Collections.max(this, c ompare); 24357 CssValue max([int compare(CssValue a, CssValue b)]) => IterableMixinWorkaround .max(this, compare);
24354 24358
24355 CssValue removeAt(int pos) { 24359 CssValue removeAt(int pos) {
24356 throw new UnsupportedError("Cannot removeAt on immutable List."); 24360 throw new UnsupportedError("Cannot removeAt on immutable List.");
24357 } 24361 }
24358 24362
24359 CssValue removeLast() { 24363 CssValue removeLast() {
24360 throw new UnsupportedError("Cannot removeLast on immutable List."); 24364 throw new UnsupportedError("Cannot removeLast on immutable List.");
24361 } 24365 }
24362 24366
24363 void setRange(int start, int rangeLength, List<CssValue> from, [int startFrom] ) { 24367 void setRange(int start, int rangeLength, List<CssValue> from, [int startFrom] ) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
24414 // From Iterable<Entry>: 24418 // From Iterable<Entry>:
24415 24419
24416 Iterator<Entry> get iterator { 24420 Iterator<Entry> get iterator {
24417 // Note: NodeLists are not fixed size. And most probably length shouldn't 24421 // Note: NodeLists are not fixed size. And most probably length shouldn't
24418 // be cached in both iterator _and_ forEach method. For now caching it 24422 // be cached in both iterator _and_ forEach method. For now caching it
24419 // for consistency. 24423 // for consistency.
24420 return new FixedSizeListIterator<Entry>(this); 24424 return new FixedSizeListIterator<Entry>(this);
24421 } 24425 }
24422 24426
24423 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Entry)) { 24427 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Entry)) {
24424 return Collections.reduce(this, initialValue, combine); 24428 return IterableMixinWorkaround.reduce(this, initialValue, combine);
24425 } 24429 }
24426 24430
24427 bool contains(Entry element) => Collections.contains(this, element); 24431 bool contains(Entry element) => IterableMixinWorkaround.contains(this, element );
24428 24432
24429 void forEach(void f(Entry element)) => Collections.forEach(this, f); 24433 void forEach(void f(Entry element)) => IterableMixinWorkaround.forEach(this, f );
24430 24434
24431 String join([String separator]) => Collections.joinList(this, separator); 24435 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
24432 24436
24433 List mappedBy(f(Entry element)) => new MappedList<Entry, dynamic>(this, f); 24437 List mappedBy(f(Entry element)) => IterableMixinWorkaround.mappedByList(this, f);
24434 24438
24435 Iterable<Entry> where(bool f(Entry element)) => new WhereIterable<Entry>(this, f); 24439 Iterable<Entry> where(bool f(Entry element)) => IterableMixinWorkaround.where( this, f);
24436 24440
24437 bool every(bool f(Entry element)) => Collections.every(this, f); 24441 bool every(bool f(Entry element)) => IterableMixinWorkaround.every(this, f);
24438 24442
24439 bool any(bool f(Entry element)) => Collections.any(this, f); 24443 bool any(bool f(Entry element)) => IterableMixinWorkaround.any(this, f);
24440 24444
24441 List<Entry> toList() => new List<Entry>.from(this); 24445 List<Entry> toList() => new List<Entry>.from(this);
24442 Set<Entry> toSet() => new Set<Entry>.from(this); 24446 Set<Entry> toSet() => new Set<Entry>.from(this);
24443 24447
24444 bool get isEmpty => this.length == 0; 24448 bool get isEmpty => this.length == 0;
24445 24449
24446 List<Entry> take(int n) => new ListView<Entry>(this, 0, n); 24450 List<Entry> take(int n) => IterableMixinWorkaround.takeList(this, n);
24447 24451
24448 Iterable<Entry> takeWhile(bool test(Entry value)) { 24452 Iterable<Entry> takeWhile(bool test(Entry value)) {
24449 return new TakeWhileIterable<Entry>(this, test); 24453 return IterableMixinWorkaround.takeWhile(this, test);
24450 } 24454 }
24451 24455
24452 List<Entry> skip(int n) => new ListView<Entry>(this, n, null); 24456 List<Entry> skip(int n) => IterableMixinWorkaround.skipList(this, n);
24453 24457
24454 Iterable<Entry> skipWhile(bool test(Entry value)) { 24458 Iterable<Entry> skipWhile(bool test(Entry value)) {
24455 return new SkipWhileIterable<Entry>(this, test); 24459 return IterableMixinWorkaround.skipWhile(this, test);
24456 } 24460 }
24457 24461
24458 Entry firstMatching(bool test(Entry value), { Entry orElse() }) { 24462 Entry firstMatching(bool test(Entry value), { Entry orElse() }) {
24459 return Collections.firstMatching(this, test, orElse); 24463 return IterableMixinWorkaround.firstMatching(this, test, orElse);
24460 } 24464 }
24461 24465
24462 Entry lastMatching(bool test(Entry value), {Entry orElse()}) { 24466 Entry lastMatching(bool test(Entry value), {Entry orElse()}) {
24463 return Collections.lastMatchingInList(this, test, orElse); 24467 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
24464 } 24468 }
24465 24469
24466 Entry singleMatching(bool test(Entry value)) { 24470 Entry singleMatching(bool test(Entry value)) {
24467 return Collections.singleMatching(this, test); 24471 return IterableMixinWorkaround.singleMatching(this, test);
24468 } 24472 }
24469 24473
24470 Entry elementAt(int index) { 24474 Entry elementAt(int index) {
24471 return this[index]; 24475 return this[index];
24472 } 24476 }
24473 24477
24474 // From Collection<Entry>: 24478 // From Collection<Entry>:
24475 24479
24476 void add(Entry value) { 24480 void add(Entry value) {
24477 throw new UnsupportedError("Cannot add to immutable List."); 24481 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
24515 if (this.length > 0) return this[this.length - 1]; 24519 if (this.length > 0) return this[this.length - 1];
24516 throw new StateError("No elements"); 24520 throw new StateError("No elements");
24517 } 24521 }
24518 24522
24519 Entry get single { 24523 Entry get single {
24520 if (length == 1) return this[0]; 24524 if (length == 1) return this[0];
24521 if (length == 0) throw new StateError("No elements"); 24525 if (length == 0) throw new StateError("No elements");
24522 throw new StateError("More than one element"); 24526 throw new StateError("More than one element");
24523 } 24527 }
24524 24528
24525 Entry min([int compare(Entry a, Entry b)]) => Collections.min(this, compare); 24529 Entry min([int compare(Entry a, Entry b)]) => IterableMixinWorkaround.min(this , compare);
24526 24530
24527 Entry max([int compare(Entry a, Entry b)]) => Collections.max(this, compare); 24531 Entry max([int compare(Entry a, Entry b)]) => IterableMixinWorkaround.max(this , compare);
24528 24532
24529 Entry removeAt(int pos) { 24533 Entry removeAt(int pos) {
24530 throw new UnsupportedError("Cannot removeAt on immutable List."); 24534 throw new UnsupportedError("Cannot removeAt on immutable List.");
24531 } 24535 }
24532 24536
24533 Entry removeLast() { 24537 Entry removeLast() {
24534 throw new UnsupportedError("Cannot removeLast on immutable List."); 24538 throw new UnsupportedError("Cannot removeLast on immutable List.");
24535 } 24539 }
24536 24540
24537 void setRange(int start, int rangeLength, List<Entry> from, [int startFrom]) { 24541 void setRange(int start, int rangeLength, List<Entry> from, [int startFrom]) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
24578 // From Iterable<EntrySync>: 24582 // From Iterable<EntrySync>:
24579 24583
24580 Iterator<EntrySync> get iterator { 24584 Iterator<EntrySync> get iterator {
24581 // Note: NodeLists are not fixed size. And most probably length shouldn't 24585 // Note: NodeLists are not fixed size. And most probably length shouldn't
24582 // be cached in both iterator _and_ forEach method. For now caching it 24586 // be cached in both iterator _and_ forEach method. For now caching it
24583 // for consistency. 24587 // for consistency.
24584 return new FixedSizeListIterator<EntrySync>(this); 24588 return new FixedSizeListIterator<EntrySync>(this);
24585 } 24589 }
24586 24590
24587 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, EntrySync)) { 24591 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, EntrySync)) {
24588 return Collections.reduce(this, initialValue, combine); 24592 return IterableMixinWorkaround.reduce(this, initialValue, combine);
24589 } 24593 }
24590 24594
24591 bool contains(EntrySync element) => Collections.contains(this, element); 24595 bool contains(EntrySync element) => IterableMixinWorkaround.contains(this, ele ment);
24592 24596
24593 void forEach(void f(EntrySync element)) => Collections.forEach(this, f); 24597 void forEach(void f(EntrySync element)) => IterableMixinWorkaround.forEach(thi s, f);
24594 24598
24595 String join([String separator]) => Collections.joinList(this, separator); 24599 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
24596 24600
24597 List mappedBy(f(EntrySync element)) => new MappedList<EntrySync, dynamic>(this , f); 24601 List mappedBy(f(EntrySync element)) => IterableMixinWorkaround.mappedByList(th is, f);
24598 24602
24599 Iterable<EntrySync> where(bool f(EntrySync element)) => new WhereIterable<Entr ySync>(this, f); 24603 Iterable<EntrySync> where(bool f(EntrySync element)) => IterableMixinWorkaroun d.where(this, f);
24600 24604
24601 bool every(bool f(EntrySync element)) => Collections.every(this, f); 24605 bool every(bool f(EntrySync element)) => IterableMixinWorkaround.every(this, f );
24602 24606
24603 bool any(bool f(EntrySync element)) => Collections.any(this, f); 24607 bool any(bool f(EntrySync element)) => IterableMixinWorkaround.any(this, f);
24604 24608
24605 List<EntrySync> toList() => new List<EntrySync>.from(this); 24609 List<EntrySync> toList() => new List<EntrySync>.from(this);
24606 Set<EntrySync> toSet() => new Set<EntrySync>.from(this); 24610 Set<EntrySync> toSet() => new Set<EntrySync>.from(this);
24607 24611
24608 bool get isEmpty => this.length == 0; 24612 bool get isEmpty => this.length == 0;
24609 24613
24610 List<EntrySync> take(int n) => new ListView<EntrySync>(this, 0, n); 24614 List<EntrySync> take(int n) => IterableMixinWorkaround.takeList(this, n);
24611 24615
24612 Iterable<EntrySync> takeWhile(bool test(EntrySync value)) { 24616 Iterable<EntrySync> takeWhile(bool test(EntrySync value)) {
24613 return new TakeWhileIterable<EntrySync>(this, test); 24617 return IterableMixinWorkaround.takeWhile(this, test);
24614 } 24618 }
24615 24619
24616 List<EntrySync> skip(int n) => new ListView<EntrySync>(this, n, null); 24620 List<EntrySync> skip(int n) => IterableMixinWorkaround.skipList(this, n);
24617 24621
24618 Iterable<EntrySync> skipWhile(bool test(EntrySync value)) { 24622 Iterable<EntrySync> skipWhile(bool test(EntrySync value)) {
24619 return new SkipWhileIterable<EntrySync>(this, test); 24623 return IterableMixinWorkaround.skipWhile(this, test);
24620 } 24624 }
24621 24625
24622 EntrySync firstMatching(bool test(EntrySync value), { EntrySync orElse() }) { 24626 EntrySync firstMatching(bool test(EntrySync value), { EntrySync orElse() }) {
24623 return Collections.firstMatching(this, test, orElse); 24627 return IterableMixinWorkaround.firstMatching(this, test, orElse);
24624 } 24628 }
24625 24629
24626 EntrySync lastMatching(bool test(EntrySync value), {EntrySync orElse()}) { 24630 EntrySync lastMatching(bool test(EntrySync value), {EntrySync orElse()}) {
24627 return Collections.lastMatchingInList(this, test, orElse); 24631 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
24628 } 24632 }
24629 24633
24630 EntrySync singleMatching(bool test(EntrySync value)) { 24634 EntrySync singleMatching(bool test(EntrySync value)) {
24631 return Collections.singleMatching(this, test); 24635 return IterableMixinWorkaround.singleMatching(this, test);
24632 } 24636 }
24633 24637
24634 EntrySync elementAt(int index) { 24638 EntrySync elementAt(int index) {
24635 return this[index]; 24639 return this[index];
24636 } 24640 }
24637 24641
24638 // From Collection<EntrySync>: 24642 // From Collection<EntrySync>:
24639 24643
24640 void add(EntrySync value) { 24644 void add(EntrySync value) {
24641 throw new UnsupportedError("Cannot add to immutable List."); 24645 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
24679 if (this.length > 0) return this[this.length - 1]; 24683 if (this.length > 0) return this[this.length - 1];
24680 throw new StateError("No elements"); 24684 throw new StateError("No elements");
24681 } 24685 }
24682 24686
24683 EntrySync get single { 24687 EntrySync get single {
24684 if (length == 1) return this[0]; 24688 if (length == 1) return this[0];
24685 if (length == 0) throw new StateError("No elements"); 24689 if (length == 0) throw new StateError("No elements");
24686 throw new StateError("More than one element"); 24690 throw new StateError("More than one element");
24687 } 24691 }
24688 24692
24689 EntrySync min([int compare(EntrySync a, EntrySync b)]) => Collections.min(this , compare); 24693 EntrySync min([int compare(EntrySync a, EntrySync b)]) => IterableMixinWorkaro und.min(this, compare);
24690 24694
24691 EntrySync max([int compare(EntrySync a, EntrySync b)]) => Collections.max(this , compare); 24695 EntrySync max([int compare(EntrySync a, EntrySync b)]) => IterableMixinWorkaro und.max(this, compare);
24692 24696
24693 EntrySync removeAt(int pos) { 24697 EntrySync removeAt(int pos) {
24694 throw new UnsupportedError("Cannot removeAt on immutable List."); 24698 throw new UnsupportedError("Cannot removeAt on immutable List.");
24695 } 24699 }
24696 24700
24697 EntrySync removeLast() { 24701 EntrySync removeLast() {
24698 throw new UnsupportedError("Cannot removeLast on immutable List."); 24702 throw new UnsupportedError("Cannot removeLast on immutable List.");
24699 } 24703 }
24700 24704
24701 void setRange(int start, int rangeLength, List<EntrySync> from, [int startFrom ]) { 24705 void setRange(int start, int rangeLength, List<EntrySync> from, [int startFrom ]) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
24874 // From Iterable<Gamepad>: 24878 // From Iterable<Gamepad>:
24875 24879
24876 Iterator<Gamepad> get iterator { 24880 Iterator<Gamepad> get iterator {
24877 // Note: NodeLists are not fixed size. And most probably length shouldn't 24881 // Note: NodeLists are not fixed size. And most probably length shouldn't
24878 // be cached in both iterator _and_ forEach method. For now caching it 24882 // be cached in both iterator _and_ forEach method. For now caching it
24879 // for consistency. 24883 // for consistency.
24880 return new FixedSizeListIterator<Gamepad>(this); 24884 return new FixedSizeListIterator<Gamepad>(this);
24881 } 24885 }
24882 24886
24883 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Gamepad)) { 24887 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Gamepad)) {
24884 return Collections.reduce(this, initialValue, combine); 24888 return IterableMixinWorkaround.reduce(this, initialValue, combine);
24885 } 24889 }
24886 24890
24887 bool contains(Gamepad element) => Collections.contains(this, element); 24891 bool contains(Gamepad element) => IterableMixinWorkaround.contains(this, eleme nt);
24888 24892
24889 void forEach(void f(Gamepad element)) => Collections.forEach(this, f); 24893 void forEach(void f(Gamepad element)) => IterableMixinWorkaround.forEach(this, f);
24890 24894
24891 String join([String separator]) => Collections.joinList(this, separator); 24895 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
24892 24896
24893 List mappedBy(f(Gamepad element)) => new MappedList<Gamepad, dynamic>(this, f) ; 24897 List mappedBy(f(Gamepad element)) => IterableMixinWorkaround.mappedByList(this , f);
24894 24898
24895 Iterable<Gamepad> where(bool f(Gamepad element)) => new WhereIterable<Gamepad> (this, f); 24899 Iterable<Gamepad> where(bool f(Gamepad element)) => IterableMixinWorkaround.wh ere(this, f);
24896 24900
24897 bool every(bool f(Gamepad element)) => Collections.every(this, f); 24901 bool every(bool f(Gamepad element)) => IterableMixinWorkaround.every(this, f);
24898 24902
24899 bool any(bool f(Gamepad element)) => Collections.any(this, f); 24903 bool any(bool f(Gamepad element)) => IterableMixinWorkaround.any(this, f);
24900 24904
24901 List<Gamepad> toList() => new List<Gamepad>.from(this); 24905 List<Gamepad> toList() => new List<Gamepad>.from(this);
24902 Set<Gamepad> toSet() => new Set<Gamepad>.from(this); 24906 Set<Gamepad> toSet() => new Set<Gamepad>.from(this);
24903 24907
24904 bool get isEmpty => this.length == 0; 24908 bool get isEmpty => this.length == 0;
24905 24909
24906 List<Gamepad> take(int n) => new ListView<Gamepad>(this, 0, n); 24910 List<Gamepad> take(int n) => IterableMixinWorkaround.takeList(this, n);
24907 24911
24908 Iterable<Gamepad> takeWhile(bool test(Gamepad value)) { 24912 Iterable<Gamepad> takeWhile(bool test(Gamepad value)) {
24909 return new TakeWhileIterable<Gamepad>(this, test); 24913 return IterableMixinWorkaround.takeWhile(this, test);
24910 } 24914 }
24911 24915
24912 List<Gamepad> skip(int n) => new ListView<Gamepad>(this, n, null); 24916 List<Gamepad> skip(int n) => IterableMixinWorkaround.skipList(this, n);
24913 24917
24914 Iterable<Gamepad> skipWhile(bool test(Gamepad value)) { 24918 Iterable<Gamepad> skipWhile(bool test(Gamepad value)) {
24915 return new SkipWhileIterable<Gamepad>(this, test); 24919 return IterableMixinWorkaround.skipWhile(this, test);
24916 } 24920 }
24917 24921
24918 Gamepad firstMatching(bool test(Gamepad value), { Gamepad orElse() }) { 24922 Gamepad firstMatching(bool test(Gamepad value), { Gamepad orElse() }) {
24919 return Collections.firstMatching(this, test, orElse); 24923 return IterableMixinWorkaround.firstMatching(this, test, orElse);
24920 } 24924 }
24921 24925
24922 Gamepad lastMatching(bool test(Gamepad value), {Gamepad orElse()}) { 24926 Gamepad lastMatching(bool test(Gamepad value), {Gamepad orElse()}) {
24923 return Collections.lastMatchingInList(this, test, orElse); 24927 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
24924 } 24928 }
24925 24929
24926 Gamepad singleMatching(bool test(Gamepad value)) { 24930 Gamepad singleMatching(bool test(Gamepad value)) {
24927 return Collections.singleMatching(this, test); 24931 return IterableMixinWorkaround.singleMatching(this, test);
24928 } 24932 }
24929 24933
24930 Gamepad elementAt(int index) { 24934 Gamepad elementAt(int index) {
24931 return this[index]; 24935 return this[index];
24932 } 24936 }
24933 24937
24934 // From Collection<Gamepad>: 24938 // From Collection<Gamepad>:
24935 24939
24936 void add(Gamepad value) { 24940 void add(Gamepad value) {
24937 throw new UnsupportedError("Cannot add to immutable List."); 24941 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
24975 if (this.length > 0) return this[this.length - 1]; 24979 if (this.length > 0) return this[this.length - 1];
24976 throw new StateError("No elements"); 24980 throw new StateError("No elements");
24977 } 24981 }
24978 24982
24979 Gamepad get single { 24983 Gamepad get single {
24980 if (length == 1) return this[0]; 24984 if (length == 1) return this[0];
24981 if (length == 0) throw new StateError("No elements"); 24985 if (length == 0) throw new StateError("No elements");
24982 throw new StateError("More than one element"); 24986 throw new StateError("More than one element");
24983 } 24987 }
24984 24988
24985 Gamepad min([int compare(Gamepad a, Gamepad b)]) => Collections.min(this, comp are); 24989 Gamepad min([int compare(Gamepad a, Gamepad b)]) => IterableMixinWorkaround.mi n(this, compare);
24986 24990
24987 Gamepad max([int compare(Gamepad a, Gamepad b)]) => Collections.max(this, comp are); 24991 Gamepad max([int compare(Gamepad a, Gamepad b)]) => IterableMixinWorkaround.ma x(this, compare);
24988 24992
24989 Gamepad removeAt(int pos) { 24993 Gamepad removeAt(int pos) {
24990 throw new UnsupportedError("Cannot removeAt on immutable List."); 24994 throw new UnsupportedError("Cannot removeAt on immutable List.");
24991 } 24995 }
24992 24996
24993 Gamepad removeLast() { 24997 Gamepad removeLast() {
24994 throw new UnsupportedError("Cannot removeLast on immutable List."); 24998 throw new UnsupportedError("Cannot removeLast on immutable List.");
24995 } 24999 }
24996 25000
24997 void setRange(int start, int rangeLength, List<Gamepad> from, [int startFrom]) { 25001 void setRange(int start, int rangeLength, List<Gamepad> from, [int startFrom]) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
25048 // From Iterable<MediaStream>: 25052 // From Iterable<MediaStream>:
25049 25053
25050 Iterator<MediaStream> get iterator { 25054 Iterator<MediaStream> get iterator {
25051 // Note: NodeLists are not fixed size. And most probably length shouldn't 25055 // Note: NodeLists are not fixed size. And most probably length shouldn't
25052 // be cached in both iterator _and_ forEach method. For now caching it 25056 // be cached in both iterator _and_ forEach method. For now caching it
25053 // for consistency. 25057 // for consistency.
25054 return new FixedSizeListIterator<MediaStream>(this); 25058 return new FixedSizeListIterator<MediaStream>(this);
25055 } 25059 }
25056 25060
25057 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, MediaStream)) { 25061 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, MediaStream)) {
25058 return Collections.reduce(this, initialValue, combine); 25062 return IterableMixinWorkaround.reduce(this, initialValue, combine);
25059 } 25063 }
25060 25064
25061 bool contains(MediaStream element) => Collections.contains(this, element); 25065 bool contains(MediaStream element) => IterableMixinWorkaround.contains(this, e lement);
25062 25066
25063 void forEach(void f(MediaStream element)) => Collections.forEach(this, f); 25067 void forEach(void f(MediaStream element)) => IterableMixinWorkaround.forEach(t his, f);
25064 25068
25065 String join([String separator]) => Collections.joinList(this, separator); 25069 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
25066 25070
25067 List mappedBy(f(MediaStream element)) => new MappedList<MediaStream, dynamic>( this, f); 25071 List mappedBy(f(MediaStream element)) => IterableMixinWorkaround.mappedByList( this, f);
25068 25072
25069 Iterable<MediaStream> where(bool f(MediaStream element)) => new WhereIterable< MediaStream>(this, f); 25073 Iterable<MediaStream> where(bool f(MediaStream element)) => IterableMixinWorka round.where(this, f);
25070 25074
25071 bool every(bool f(MediaStream element)) => Collections.every(this, f); 25075 bool every(bool f(MediaStream element)) => IterableMixinWorkaround.every(this, f);
25072 25076
25073 bool any(bool f(MediaStream element)) => Collections.any(this, f); 25077 bool any(bool f(MediaStream element)) => IterableMixinWorkaround.any(this, f);
25074 25078
25075 List<MediaStream> toList() => new List<MediaStream>.from(this); 25079 List<MediaStream> toList() => new List<MediaStream>.from(this);
25076 Set<MediaStream> toSet() => new Set<MediaStream>.from(this); 25080 Set<MediaStream> toSet() => new Set<MediaStream>.from(this);
25077 25081
25078 bool get isEmpty => this.length == 0; 25082 bool get isEmpty => this.length == 0;
25079 25083
25080 List<MediaStream> take(int n) => new ListView<MediaStream>(this, 0, n); 25084 List<MediaStream> take(int n) => IterableMixinWorkaround.takeList(this, n);
25081 25085
25082 Iterable<MediaStream> takeWhile(bool test(MediaStream value)) { 25086 Iterable<MediaStream> takeWhile(bool test(MediaStream value)) {
25083 return new TakeWhileIterable<MediaStream>(this, test); 25087 return IterableMixinWorkaround.takeWhile(this, test);
25084 } 25088 }
25085 25089
25086 List<MediaStream> skip(int n) => new ListView<MediaStream>(this, n, null); 25090 List<MediaStream> skip(int n) => IterableMixinWorkaround.skipList(this, n);
25087 25091
25088 Iterable<MediaStream> skipWhile(bool test(MediaStream value)) { 25092 Iterable<MediaStream> skipWhile(bool test(MediaStream value)) {
25089 return new SkipWhileIterable<MediaStream>(this, test); 25093 return IterableMixinWorkaround.skipWhile(this, test);
25090 } 25094 }
25091 25095
25092 MediaStream firstMatching(bool test(MediaStream value), { MediaStream orElse() }) { 25096 MediaStream firstMatching(bool test(MediaStream value), { MediaStream orElse() }) {
25093 return Collections.firstMatching(this, test, orElse); 25097 return IterableMixinWorkaround.firstMatching(this, test, orElse);
25094 } 25098 }
25095 25099
25096 MediaStream lastMatching(bool test(MediaStream value), {MediaStream orElse()}) { 25100 MediaStream lastMatching(bool test(MediaStream value), {MediaStream orElse()}) {
25097 return Collections.lastMatchingInList(this, test, orElse); 25101 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
25098 } 25102 }
25099 25103
25100 MediaStream singleMatching(bool test(MediaStream value)) { 25104 MediaStream singleMatching(bool test(MediaStream value)) {
25101 return Collections.singleMatching(this, test); 25105 return IterableMixinWorkaround.singleMatching(this, test);
25102 } 25106 }
25103 25107
25104 MediaStream elementAt(int index) { 25108 MediaStream elementAt(int index) {
25105 return this[index]; 25109 return this[index];
25106 } 25110 }
25107 25111
25108 // From Collection<MediaStream>: 25112 // From Collection<MediaStream>:
25109 25113
25110 void add(MediaStream value) { 25114 void add(MediaStream value) {
25111 throw new UnsupportedError("Cannot add to immutable List."); 25115 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
25149 if (this.length > 0) return this[this.length - 1]; 25153 if (this.length > 0) return this[this.length - 1];
25150 throw new StateError("No elements"); 25154 throw new StateError("No elements");
25151 } 25155 }
25152 25156
25153 MediaStream get single { 25157 MediaStream get single {
25154 if (length == 1) return this[0]; 25158 if (length == 1) return this[0];
25155 if (length == 0) throw new StateError("No elements"); 25159 if (length == 0) throw new StateError("No elements");
25156 throw new StateError("More than one element"); 25160 throw new StateError("More than one element");
25157 } 25161 }
25158 25162
25159 MediaStream min([int compare(MediaStream a, MediaStream b)]) => Collections.mi n(this, compare); 25163 MediaStream min([int compare(MediaStream a, MediaStream b)]) => IterableMixinW orkaround.min(this, compare);
25160 25164
25161 MediaStream max([int compare(MediaStream a, MediaStream b)]) => Collections.ma x(this, compare); 25165 MediaStream max([int compare(MediaStream a, MediaStream b)]) => IterableMixinW orkaround.max(this, compare);
25162 25166
25163 MediaStream removeAt(int pos) { 25167 MediaStream removeAt(int pos) {
25164 throw new UnsupportedError("Cannot removeAt on immutable List."); 25168 throw new UnsupportedError("Cannot removeAt on immutable List.");
25165 } 25169 }
25166 25170
25167 MediaStream removeLast() { 25171 MediaStream removeLast() {
25168 throw new UnsupportedError("Cannot removeLast on immutable List."); 25172 throw new UnsupportedError("Cannot removeLast on immutable List.");
25169 } 25173 }
25170 25174
25171 void setRange(int start, int rangeLength, List<MediaStream> from, [int startFr om]) { 25175 void setRange(int start, int rangeLength, List<MediaStream> from, [int startFr om]) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
25212 // From Iterable<SpeechInputResult>: 25216 // From Iterable<SpeechInputResult>:
25213 25217
25214 Iterator<SpeechInputResult> get iterator { 25218 Iterator<SpeechInputResult> get iterator {
25215 // Note: NodeLists are not fixed size. And most probably length shouldn't 25219 // Note: NodeLists are not fixed size. And most probably length shouldn't
25216 // be cached in both iterator _and_ forEach method. For now caching it 25220 // be cached in both iterator _and_ forEach method. For now caching it
25217 // for consistency. 25221 // for consistency.
25218 return new FixedSizeListIterator<SpeechInputResult>(this); 25222 return new FixedSizeListIterator<SpeechInputResult>(this);
25219 } 25223 }
25220 25224
25221 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechInputResul t)) { 25225 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechInputResul t)) {
25222 return Collections.reduce(this, initialValue, combine); 25226 return IterableMixinWorkaround.reduce(this, initialValue, combine);
25223 } 25227 }
25224 25228
25225 bool contains(SpeechInputResult element) => Collections.contains(this, element ); 25229 bool contains(SpeechInputResult element) => IterableMixinWorkaround.contains(t his, element);
25226 25230
25227 void forEach(void f(SpeechInputResult element)) => Collections.forEach(this, f ); 25231 void forEach(void f(SpeechInputResult element)) => IterableMixinWorkaround.for Each(this, f);
25228 25232
25229 String join([String separator]) => Collections.joinList(this, separator); 25233 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
25230 25234
25231 List mappedBy(f(SpeechInputResult element)) => new MappedList<SpeechInputResul t, dynamic>(this, f); 25235 List mappedBy(f(SpeechInputResult element)) => IterableMixinWorkaround.mappedB yList(this, f);
25232 25236
25233 Iterable<SpeechInputResult> where(bool f(SpeechInputResult element)) => new Wh ereIterable<SpeechInputResult>(this, f); 25237 Iterable<SpeechInputResult> where(bool f(SpeechInputResult element)) => Iterab leMixinWorkaround.where(this, f);
25234 25238
25235 bool every(bool f(SpeechInputResult element)) => Collections.every(this, f); 25239 bool every(bool f(SpeechInputResult element)) => IterableMixinWorkaround.every (this, f);
25236 25240
25237 bool any(bool f(SpeechInputResult element)) => Collections.any(this, f); 25241 bool any(bool f(SpeechInputResult element)) => IterableMixinWorkaround.any(thi s, f);
25238 25242
25239 List<SpeechInputResult> toList() => new List<SpeechInputResult>.from(this); 25243 List<SpeechInputResult> toList() => new List<SpeechInputResult>.from(this);
25240 Set<SpeechInputResult> toSet() => new Set<SpeechInputResult>.from(this); 25244 Set<SpeechInputResult> toSet() => new Set<SpeechInputResult>.from(this);
25241 25245
25242 bool get isEmpty => this.length == 0; 25246 bool get isEmpty => this.length == 0;
25243 25247
25244 List<SpeechInputResult> take(int n) => new ListView<SpeechInputResult>(this, 0 , n); 25248 List<SpeechInputResult> take(int n) => IterableMixinWorkaround.takeList(this, n);
25245 25249
25246 Iterable<SpeechInputResult> takeWhile(bool test(SpeechInputResult value)) { 25250 Iterable<SpeechInputResult> takeWhile(bool test(SpeechInputResult value)) {
25247 return new TakeWhileIterable<SpeechInputResult>(this, test); 25251 return IterableMixinWorkaround.takeWhile(this, test);
25248 } 25252 }
25249 25253
25250 List<SpeechInputResult> skip(int n) => new ListView<SpeechInputResult>(this, n , null); 25254 List<SpeechInputResult> skip(int n) => IterableMixinWorkaround.skipList(this, n);
25251 25255
25252 Iterable<SpeechInputResult> skipWhile(bool test(SpeechInputResult value)) { 25256 Iterable<SpeechInputResult> skipWhile(bool test(SpeechInputResult value)) {
25253 return new SkipWhileIterable<SpeechInputResult>(this, test); 25257 return IterableMixinWorkaround.skipWhile(this, test);
25254 } 25258 }
25255 25259
25256 SpeechInputResult firstMatching(bool test(SpeechInputResult value), { SpeechIn putResult orElse() }) { 25260 SpeechInputResult firstMatching(bool test(SpeechInputResult value), { SpeechIn putResult orElse() }) {
25257 return Collections.firstMatching(this, test, orElse); 25261 return IterableMixinWorkaround.firstMatching(this, test, orElse);
25258 } 25262 }
25259 25263
25260 SpeechInputResult lastMatching(bool test(SpeechInputResult value), {SpeechInpu tResult orElse()}) { 25264 SpeechInputResult lastMatching(bool test(SpeechInputResult value), {SpeechInpu tResult orElse()}) {
25261 return Collections.lastMatchingInList(this, test, orElse); 25265 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
25262 } 25266 }
25263 25267
25264 SpeechInputResult singleMatching(bool test(SpeechInputResult value)) { 25268 SpeechInputResult singleMatching(bool test(SpeechInputResult value)) {
25265 return Collections.singleMatching(this, test); 25269 return IterableMixinWorkaround.singleMatching(this, test);
25266 } 25270 }
25267 25271
25268 SpeechInputResult elementAt(int index) { 25272 SpeechInputResult elementAt(int index) {
25269 return this[index]; 25273 return this[index];
25270 } 25274 }
25271 25275
25272 // From Collection<SpeechInputResult>: 25276 // From Collection<SpeechInputResult>:
25273 25277
25274 void add(SpeechInputResult value) { 25278 void add(SpeechInputResult value) {
25275 throw new UnsupportedError("Cannot add to immutable List."); 25279 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
25313 if (this.length > 0) return this[this.length - 1]; 25317 if (this.length > 0) return this[this.length - 1];
25314 throw new StateError("No elements"); 25318 throw new StateError("No elements");
25315 } 25319 }
25316 25320
25317 SpeechInputResult get single { 25321 SpeechInputResult get single {
25318 if (length == 1) return this[0]; 25322 if (length == 1) return this[0];
25319 if (length == 0) throw new StateError("No elements"); 25323 if (length == 0) throw new StateError("No elements");
25320 throw new StateError("More than one element"); 25324 throw new StateError("More than one element");
25321 } 25325 }
25322 25326
25323 SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) => Collections.min(this, compare); 25327 SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) => IterableMixinWorkaround.min(this, compare);
25324 25328
25325 SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) => Collections.max(this, compare); 25329 SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) => IterableMixinWorkaround.max(this, compare);
25326 25330
25327 SpeechInputResult removeAt(int pos) { 25331 SpeechInputResult removeAt(int pos) {
25328 throw new UnsupportedError("Cannot removeAt on immutable List."); 25332 throw new UnsupportedError("Cannot removeAt on immutable List.");
25329 } 25333 }
25330 25334
25331 SpeechInputResult removeLast() { 25335 SpeechInputResult removeLast() {
25332 throw new UnsupportedError("Cannot removeLast on immutable List."); 25336 throw new UnsupportedError("Cannot removeLast on immutable List.");
25333 } 25337 }
25334 25338
25335 void setRange(int start, int rangeLength, List<SpeechInputResult> from, [int s tartFrom]) { 25339 void setRange(int start, int rangeLength, List<SpeechInputResult> from, [int s tartFrom]) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
25376 // From Iterable<SpeechRecognitionResult>: 25380 // From Iterable<SpeechRecognitionResult>:
25377 25381
25378 Iterator<SpeechRecognitionResult> get iterator { 25382 Iterator<SpeechRecognitionResult> get iterator {
25379 // Note: NodeLists are not fixed size. And most probably length shouldn't 25383 // Note: NodeLists are not fixed size. And most probably length shouldn't
25380 // be cached in both iterator _and_ forEach method. For now caching it 25384 // be cached in both iterator _and_ forEach method. For now caching it
25381 // for consistency. 25385 // for consistency.
25382 return new FixedSizeListIterator<SpeechRecognitionResult>(this); 25386 return new FixedSizeListIterator<SpeechRecognitionResult>(this);
25383 } 25387 }
25384 25388
25385 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechRecognitio nResult)) { 25389 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechRecognitio nResult)) {
25386 return Collections.reduce(this, initialValue, combine); 25390 return IterableMixinWorkaround.reduce(this, initialValue, combine);
25387 } 25391 }
25388 25392
25389 bool contains(SpeechRecognitionResult element) => Collections.contains(this, e lement); 25393 bool contains(SpeechRecognitionResult element) => IterableMixinWorkaround.cont ains(this, element);
25390 25394
25391 void forEach(void f(SpeechRecognitionResult element)) => Collections.forEach(t his, f); 25395 void forEach(void f(SpeechRecognitionResult element)) => IterableMixinWorkarou nd.forEach(this, f);
25392 25396
25393 String join([String separator]) => Collections.joinList(this, separator); 25397 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
25394 25398
25395 List mappedBy(f(SpeechRecognitionResult element)) => new MappedList<SpeechReco gnitionResult, dynamic>(this, f); 25399 List mappedBy(f(SpeechRecognitionResult element)) => IterableMixinWorkaround.m appedByList(this, f);
25396 25400
25397 Iterable<SpeechRecognitionResult> where(bool f(SpeechRecognitionResult element )) => new WhereIterable<SpeechRecognitionResult>(this, f); 25401 Iterable<SpeechRecognitionResult> where(bool f(SpeechRecognitionResult element )) => IterableMixinWorkaround.where(this, f);
25398 25402
25399 bool every(bool f(SpeechRecognitionResult element)) => Collections.every(this, f); 25403 bool every(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround .every(this, f);
25400 25404
25401 bool any(bool f(SpeechRecognitionResult element)) => Collections.any(this, f); 25405 bool any(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.a ny(this, f);
25402 25406
25403 List<SpeechRecognitionResult> toList() => new List<SpeechRecognitionResult>.fr om(this); 25407 List<SpeechRecognitionResult> toList() => new List<SpeechRecognitionResult>.fr om(this);
25404 Set<SpeechRecognitionResult> toSet() => new Set<SpeechRecognitionResult>.from( this); 25408 Set<SpeechRecognitionResult> toSet() => new Set<SpeechRecognitionResult>.from( this);
25405 25409
25406 bool get isEmpty => this.length == 0; 25410 bool get isEmpty => this.length == 0;
25407 25411
25408 List<SpeechRecognitionResult> take(int n) => new ListView<SpeechRecognitionRes ult>(this, 0, n); 25412 List<SpeechRecognitionResult> take(int n) => IterableMixinWorkaround.takeList( this, n);
25409 25413
25410 Iterable<SpeechRecognitionResult> takeWhile(bool test(SpeechRecognitionResult value)) { 25414 Iterable<SpeechRecognitionResult> takeWhile(bool test(SpeechRecognitionResult value)) {
25411 return new TakeWhileIterable<SpeechRecognitionResult>(this, test); 25415 return IterableMixinWorkaround.takeWhile(this, test);
25412 } 25416 }
25413 25417
25414 List<SpeechRecognitionResult> skip(int n) => new ListView<SpeechRecognitionRes ult>(this, n, null); 25418 List<SpeechRecognitionResult> skip(int n) => IterableMixinWorkaround.skipList( this, n);
25415 25419
25416 Iterable<SpeechRecognitionResult> skipWhile(bool test(SpeechRecognitionResult value)) { 25420 Iterable<SpeechRecognitionResult> skipWhile(bool test(SpeechRecognitionResult value)) {
25417 return new SkipWhileIterable<SpeechRecognitionResult>(this, test); 25421 return IterableMixinWorkaround.skipWhile(this, test);
25418 } 25422 }
25419 25423
25420 SpeechRecognitionResult firstMatching(bool test(SpeechRecognitionResult value) , { SpeechRecognitionResult orElse() }) { 25424 SpeechRecognitionResult firstMatching(bool test(SpeechRecognitionResult value) , { SpeechRecognitionResult orElse() }) {
25421 return Collections.firstMatching(this, test, orElse); 25425 return IterableMixinWorkaround.firstMatching(this, test, orElse);
25422 } 25426 }
25423 25427
25424 SpeechRecognitionResult lastMatching(bool test(SpeechRecognitionResult value), {SpeechRecognitionResult orElse()}) { 25428 SpeechRecognitionResult lastMatching(bool test(SpeechRecognitionResult value), {SpeechRecognitionResult orElse()}) {
25425 return Collections.lastMatchingInList(this, test, orElse); 25429 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
25426 } 25430 }
25427 25431
25428 SpeechRecognitionResult singleMatching(bool test(SpeechRecognitionResult value )) { 25432 SpeechRecognitionResult singleMatching(bool test(SpeechRecognitionResult value )) {
25429 return Collections.singleMatching(this, test); 25433 return IterableMixinWorkaround.singleMatching(this, test);
25430 } 25434 }
25431 25435
25432 SpeechRecognitionResult elementAt(int index) { 25436 SpeechRecognitionResult elementAt(int index) {
25433 return this[index]; 25437 return this[index];
25434 } 25438 }
25435 25439
25436 // From Collection<SpeechRecognitionResult>: 25440 // From Collection<SpeechRecognitionResult>:
25437 25441
25438 void add(SpeechRecognitionResult value) { 25442 void add(SpeechRecognitionResult value) {
25439 throw new UnsupportedError("Cannot add to immutable List."); 25443 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
25477 if (this.length > 0) return this[this.length - 1]; 25481 if (this.length > 0) return this[this.length - 1];
25478 throw new StateError("No elements"); 25482 throw new StateError("No elements");
25479 } 25483 }
25480 25484
25481 SpeechRecognitionResult get single { 25485 SpeechRecognitionResult get single {
25482 if (length == 1) return this[0]; 25486 if (length == 1) return this[0];
25483 if (length == 0) throw new StateError("No elements"); 25487 if (length == 0) throw new StateError("No elements");
25484 throw new StateError("More than one element"); 25488 throw new StateError("More than one element");
25485 } 25489 }
25486 25490
25487 SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechReco gnitionResult b)]) => Collections.min(this, compare); 25491 SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechReco gnitionResult b)]) => IterableMixinWorkaround.min(this, compare);
25488 25492
25489 SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechReco gnitionResult b)]) => Collections.max(this, compare); 25493 SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechReco gnitionResult b)]) => IterableMixinWorkaround.max(this, compare);
25490 25494
25491 SpeechRecognitionResult removeAt(int pos) { 25495 SpeechRecognitionResult removeAt(int pos) {
25492 throw new UnsupportedError("Cannot removeAt on immutable List."); 25496 throw new UnsupportedError("Cannot removeAt on immutable List.");
25493 } 25497 }
25494 25498
25495 SpeechRecognitionResult removeLast() { 25499 SpeechRecognitionResult removeLast() {
25496 throw new UnsupportedError("Cannot removeLast on immutable List."); 25500 throw new UnsupportedError("Cannot removeLast on immutable List.");
25497 } 25501 }
25498 25502
25499 void setRange(int start, int rangeLength, List<SpeechRecognitionResult> from, [int startFrom]) { 25503 void setRange(int start, int rangeLength, List<SpeechRecognitionResult> from, [int startFrom]) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
25540 // From Iterable<StyleSheet>: 25544 // From Iterable<StyleSheet>:
25541 25545
25542 Iterator<StyleSheet> get iterator { 25546 Iterator<StyleSheet> get iterator {
25543 // Note: NodeLists are not fixed size. And most probably length shouldn't 25547 // Note: NodeLists are not fixed size. And most probably length shouldn't
25544 // be cached in both iterator _and_ forEach method. For now caching it 25548 // be cached in both iterator _and_ forEach method. For now caching it
25545 // for consistency. 25549 // for consistency.
25546 return new FixedSizeListIterator<StyleSheet>(this); 25550 return new FixedSizeListIterator<StyleSheet>(this);
25547 } 25551 }
25548 25552
25549 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, StyleSheet)) { 25553 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, StyleSheet)) {
25550 return Collections.reduce(this, initialValue, combine); 25554 return IterableMixinWorkaround.reduce(this, initialValue, combine);
25551 } 25555 }
25552 25556
25553 bool contains(StyleSheet element) => Collections.contains(this, element); 25557 bool contains(StyleSheet element) => IterableMixinWorkaround.contains(this, el ement);
25554 25558
25555 void forEach(void f(StyleSheet element)) => Collections.forEach(this, f); 25559 void forEach(void f(StyleSheet element)) => IterableMixinWorkaround.forEach(th is, f);
25556 25560
25557 String join([String separator]) => Collections.joinList(this, separator); 25561 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator);
25558 25562
25559 List mappedBy(f(StyleSheet element)) => new MappedList<StyleSheet, dynamic>(th is, f); 25563 List mappedBy(f(StyleSheet element)) => IterableMixinWorkaround.mappedByList(t his, f);
25560 25564
25561 Iterable<StyleSheet> where(bool f(StyleSheet element)) => new WhereIterable<St yleSheet>(this, f); 25565 Iterable<StyleSheet> where(bool f(StyleSheet element)) => IterableMixinWorkaro und.where(this, f);
25562 25566
25563 bool every(bool f(StyleSheet element)) => Collections.every(this, f); 25567 bool every(bool f(StyleSheet element)) => IterableMixinWorkaround.every(this, f);
25564 25568
25565 bool any(bool f(StyleSheet element)) => Collections.any(this, f); 25569 bool any(bool f(StyleSheet element)) => IterableMixinWorkaround.any(this, f);
25566 25570
25567 List<StyleSheet> toList() => new List<StyleSheet>.from(this); 25571 List<StyleSheet> toList() => new List<StyleSheet>.from(this);
25568 Set<StyleSheet> toSet() => new Set<StyleSheet>.from(this); 25572 Set<StyleSheet> toSet() => new Set<StyleSheet>.from(this);
25569 25573
25570 bool get isEmpty => this.length == 0; 25574 bool get isEmpty => this.length == 0;
25571 25575
25572 List<StyleSheet> take(int n) => new ListView<StyleSheet>(this, 0, n); 25576 List<StyleSheet> take(int n) => IterableMixinWorkaround.takeList(this, n);
25573 25577
25574 Iterable<StyleSheet> takeWhile(bool test(StyleSheet value)) { 25578 Iterable<StyleSheet> takeWhile(bool test(StyleSheet value)) {
25575 return new TakeWhileIterable<StyleSheet>(this, test); 25579 return IterableMixinWorkaround.takeWhile(this, test);
25576 } 25580 }
25577 25581
25578 List<StyleSheet> skip(int n) => new ListView<StyleSheet>(this, n, null); 25582 List<StyleSheet> skip(int n) => IterableMixinWorkaround.skipList(this, n);
25579 25583
25580 Iterable<StyleSheet> skipWhile(bool test(StyleSheet value)) { 25584 Iterable<StyleSheet> skipWhile(bool test(StyleSheet value)) {
25581 return new SkipWhileIterable<StyleSheet>(this, test); 25585 return IterableMixinWorkaround.skipWhile(this, test);
25582 } 25586 }
25583 25587
25584 StyleSheet firstMatching(bool test(StyleSheet value), { StyleSheet orElse() }) { 25588 StyleSheet firstMatching(bool test(StyleSheet value), { StyleSheet orElse() }) {
25585 return Collections.firstMatching(this, test, orElse); 25589 return IterableMixinWorkaround.firstMatching(this, test, orElse);
25586 } 25590 }
25587 25591
25588 StyleSheet lastMatching(bool test(StyleSheet value), {StyleSheet orElse()}) { 25592 StyleSheet lastMatching(bool test(StyleSheet value), {StyleSheet orElse()}) {
25589 return Collections.lastMatchingInList(this, test, orElse); 25593 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse);
25590 } 25594 }
25591 25595
25592 StyleSheet singleMatching(bool test(StyleSheet value)) { 25596 StyleSheet singleMatching(bool test(StyleSheet value)) {
25593 return Collections.singleMatching(this, test); 25597 return IterableMixinWorkaround.singleMatching(this, test);
25594 } 25598 }
25595 25599
25596 StyleSheet elementAt(int index) { 25600 StyleSheet elementAt(int index) {
25597 return this[index]; 25601 return this[index];
25598 } 25602 }
25599 25603
25600 // From Collection<StyleSheet>: 25604 // From Collection<StyleSheet>:
25601 25605
25602 void add(StyleSheet value) { 25606 void add(StyleSheet value) {
25603 throw new UnsupportedError("Cannot add to immutable List."); 25607 throw new UnsupportedError("Cannot add to immutable List.");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
25641 if (this.length > 0) return this[this.length - 1]; 25645 if (this.length > 0) return this[this.length - 1];
25642 throw new StateError("No elements"); 25646 throw new StateError("No elements");
25643 } 25647 }
25644 25648
25645 StyleSheet get single { 25649 StyleSheet get single {
25646 if (length == 1) return this[0]; 25650 if (length == 1) return this[0];
25647 if (length == 0) throw new StateError("No elements"); 25651 if (length == 0) throw new StateError("No elements");
25648 throw new StateError("More than one element"); 25652 throw new StateError("More than one element");
25649 } 25653 }
25650 25654
25651 StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) => Collections.min(t his, compare); 25655 StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) => IterableMixinWork around.min(this, compare);
25652 25656
25653 StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) => Collections.max(t his, compare); 25657 StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) => IterableMixinWork around.max(this, compare);
25654 25658
25655 StyleSheet removeAt(int pos) { 25659 StyleSheet removeAt(int pos) {
25656 throw new UnsupportedError("Cannot removeAt on immutable List."); 25660 throw new UnsupportedError("Cannot removeAt on immutable List.");
25657 } 25661 }
25658 25662
25659 StyleSheet removeLast() { 25663 StyleSheet removeLast() {
25660 throw new UnsupportedError("Cannot removeLast on immutable List."); 25664 throw new UnsupportedError("Cannot removeLast on immutable List.");
25661 } 25665 }
25662 25666
25663 void setRange(int start, int rangeLength, List<StyleSheet> from, [int startFro m]) { 25667 void setRange(int start, int rangeLength, List<StyleSheet> from, [int startFro m]) {
(...skipping 3258 matching lines...) Expand 10 before | Expand all | Expand 10 after
28922 _position = nextPosition; 28926 _position = nextPosition;
28923 return true; 28927 return true;
28924 } 28928 }
28925 _current = null; 28929 _current = null;
28926 _position = _array.length; 28930 _position = _array.length;
28927 return false; 28931 return false;
28928 } 28932 }
28929 28933
28930 T get current => _current; 28934 T get current => _current;
28931 } 28935 }
OLDNEW
« no previous file with comments | « sdk/lib/collection/collections.dart ('k') | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698