OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #library("dart:coreimpl"); | 5 #library("dart:coreimpl"); |
6 | 6 |
7 #source("../../corelib/src/implementation/dual_pivot_quicksort.dart"); | 7 #source("../../corelib/src/implementation/dual_pivot_quicksort.dart"); |
8 #source("../../corelib/src/implementation/duration_implementation.dart"); | 8 #source("../../corelib/src/implementation/duration_implementation.dart"); |
9 #source("../../corelib/src/implementation/exceptions.dart"); | 9 #source("../../corelib/src/implementation/exceptions.dart"); |
10 #source("../../corelib/src/implementation/future_implementation.dart"); | 10 #source("../../corelib/src/implementation/future_implementation.dart"); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 args[1] = 0; | 101 args[1] = 0; |
102 for (var i = 0; i < length; i++) { | 102 for (var i = 0; i < length; i++) { |
103 args[i + 2] = initialValue; | 103 args[i + 2] = initialValue; |
104 } | 104 } |
105 this.splice.apply(this, args); | 105 this.splice.apply(this, args); |
106 """; | 106 """; |
107 | 107 |
108 // Collection<E> members: | 108 // Collection<E> members: |
109 void forEach(void f(E element)) native; | 109 void forEach(void f(E element)) native; |
110 Collection<E> filter(bool f(E element)) native; | 110 Collection<E> filter(bool f(E element)) native; |
| 111 Collection map(f(E element)) native; |
111 bool every(bool f(E element)) native; | 112 bool every(bool f(E element)) native; |
112 bool some(bool f(E element)) native; | 113 bool some(bool f(E element)) native; |
113 bool isEmpty() => length == 0; | 114 bool isEmpty() => length == 0; |
114 | 115 |
115 // Iterable<E> members: | 116 // Iterable<E> members: |
116 Iterator<E> iterator() => new ListIterator(this); | 117 Iterator<E> iterator() => new ListIterator(this); |
117 } | 118 } |
118 | 119 |
119 // Iterator for lists. | 120 // Iterator for lists. |
120 class ListIterator<T> implements Iterator<T> { | 121 class ListIterator<T> implements Iterator<T> { |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } else if (isNaN()) { | 466 } else if (isNaN()) { |
466 if (other.isNaN()) { | 467 if (other.isNaN()) { |
467 return 0; | 468 return 0; |
468 } | 469 } |
469 return 1; | 470 return 1; |
470 } else { | 471 } else { |
471 return -1; | 472 return -1; |
472 } | 473 } |
473 } | 474 } |
474 } | 475 } |
OLD | NEW |