| OLD | NEW |
| 1 part of dart._internal; | 1 part of dart._internal; |
| 2 abstract class EfficientLength {int get length; | 2 abstract class EfficientLength {int get length; |
| 3 } | 3 } |
| 4 abstract class ListIterable<E> extends IterableBase<E> implements EfficientLeng
th {int get length; | 4 abstract class ListIterable<E> extends IterableBase<E> implements EfficientLeng
th {int get length; |
| 5 E elementAt(int i); | 5 E elementAt(int i); |
| 6 const ListIterable(); | 6 const ListIterable(); |
| 7 Iterator<E> get iterator => new ListIterator<E>(this); | 7 Iterator<E> get iterator => new ListIterator<E>(this); |
| 8 void forEach(void action(E element)) { | 8 void forEach(void action(E element)) { |
| 9 int length = this.length; | 9 int length = this.length; |
| 10 for (int i = 0; i < length; i++) { | 10 for (int i = 0; i < length; i++) { |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 Iterable<E> skip(int count) { | 570 Iterable<E> skip(int count) { |
| 571 RangeError.checkNotNegative(count, "count"); | 571 RangeError.checkNotNegative(count, "count"); |
| 572 return this; | 572 return this; |
| 573 } | 573 } |
| 574 Iterable<E> skipWhile(bool test(E element)) => this; | 574 Iterable<E> skipWhile(bool test(E element)) => this; |
| 575 Iterable<E> take(int count) { | 575 Iterable<E> take(int count) { |
| 576 RangeError.checkNotNegative(count, "count"); | 576 RangeError.checkNotNegative(count, "count"); |
| 577 return this; | 577 return this; |
| 578 } | 578 } |
| 579 Iterable<E> takeWhile(bool test(E element)) => this; | 579 Iterable<E> takeWhile(bool test(E element)) => this; |
| 580 List toList({ | 580 List<E> toList({ |
| 581 bool growable : true} | 581 bool growable : true} |
| 582 ) => growable ? <E> [] : new List<E>(0); | 582 ) => growable ? <E> [] : new List<E>(0); |
| 583 Set toSet() => new Set<E>(); | 583 Set<E> toSet() => new Set<E>(); |
| 584 } | 584 } |
| 585 class EmptyIterator<E> implements Iterator<E> {const EmptyIterator(); | 585 class EmptyIterator<E> implements Iterator<E> {const EmptyIterator(); |
| 586 bool moveNext() => false; | 586 bool moveNext() => false; |
| 587 E get current => null; | 587 E get current => null; |
| 588 } | 588 } |
| 589 abstract class BidirectionalIterator<T> implements Iterator<T> {bool movePrevio
us(); | 589 abstract class BidirectionalIterator<T> implements Iterator<T> {bool movePrevio
us(); |
| 590 } | 590 } |
| 591 class IterableMixinWorkaround<T> {static bool contains(Iterable iterable, var e
lement) { | 591 class IterableMixinWorkaround<T> {static bool contains(Iterable iterable, var e
lement) { |
| 592 for (final e in iterable) { | 592 for (final e in iterable) { |
| 593 if (e == element) return true; | 593 if (e == element) return true; |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 } | 953 } |
| 954 abstract class IterableElementError {static StateError noElement() => new State
Error("No element"); | 954 abstract class IterableElementError {static StateError noElement() => new State
Error("No element"); |
| 955 static StateError tooMany() => new StateError("Too many elements"); | 955 static StateError tooMany() => new StateError("Too many elements"); |
| 956 static StateError tooFew() => new StateError("Too few elements"); | 956 static StateError tooFew() => new StateError("Too few elements"); |
| 957 } | 957 } |
| 958 typedef Iterable<T> __CastType0<S, T>(S __u1); | 958 typedef Iterable<T> __CastType0<S, T>(S __u1); |
| 959 typedef bool __CastType3<E>(E __u4); | 959 typedef bool __CastType3<E>(E __u4); |
| 960 typedef bool __CastType5<E>(E __u6); | 960 typedef bool __CastType5<E>(E __u6); |
| 961 typedef bool __CastType7<T>(T __u8); | 961 typedef bool __CastType7<T>(T __u8); |
| 962 typedef bool __CastType9(dynamic __u10); | 962 typedef bool __CastType9(dynamic __u10); |
| OLD | NEW |