| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Lazy implementation of the child nodes of an element that does not request | 8 * Lazy implementation of the child nodes of an element that does not request |
| 9 * the actual child nodes of an element until strictly necessary greatly | 9 * the actual child nodes of an element until strictly necessary greatly |
| 10 * improving performance for the typical cases where it is not required. | 10 * improving performance for the typical cases where it is not required. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 dynamic reduce(dynamic initialValue, | 148 dynamic reduce(dynamic initialValue, |
| 149 dynamic combine(dynamic previousValue, Node element)) { | 149 dynamic combine(dynamic previousValue, Node element)) { |
| 150 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 150 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 151 } | 151 } |
| 152 | 152 |
| 153 dynamic fold(dynamic initialValue, | 153 dynamic fold(dynamic initialValue, |
| 154 dynamic combine(dynamic previousValue, Node element)) { | 154 dynamic combine(dynamic previousValue, Node element)) { |
| 155 return IterableMixinWorkaround.fold(this, initialValue, combine); | 155 return IterableMixinWorkaround.fold(this, initialValue, combine); |
| 156 } | 156 } |
| 157 | 157 |
| 158 String join([String separator]) { | 158 String join([String separator = ""]) { |
| 159 return IterableMixinWorkaround.joinList(this, separator); | 159 return IterableMixinWorkaround.joinList(this, separator); |
| 160 } | 160 } |
| 161 | 161 |
| 162 Iterable map(f(Node element)) { | 162 Iterable map(f(Node element)) { |
| 163 return IterableMixinWorkaround.mapList(this, f); | 163 return IterableMixinWorkaround.mapList(this, f); |
| 164 } | 164 } |
| 165 | 165 |
| 166 Iterable<Node> where(bool f(Node element)) { | 166 Iterable<Node> where(bool f(Node element)) { |
| 167 return IterableMixinWorkaround.where(this, f); | 167 return IterableMixinWorkaround.where(this, f); |
| 168 } | 168 } |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 } | 425 } |
| 426 | 426 |
| 427 /** | 427 /** |
| 428 * Print out a String representation of this Node. | 428 * Print out a String representation of this Node. |
| 429 */ | 429 */ |
| 430 String toString() => localName == null ? | 430 String toString() => localName == null ? |
| 431 (nodeValue == null ? super.toString() : nodeValue) : localName; | 431 (nodeValue == null ? super.toString() : nodeValue) : localName; |
| 432 | 432 |
| 433 $!MEMBERS | 433 $!MEMBERS |
| 434 } | 434 } |
| OLD | NEW |