mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 21:10:22 +00:00
Added new version of reduce.
Removed min/max and uses of min/max. Review URL: https://codereview.chromium.org//14071002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21258 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
9fd1680aa5
commit
f41508d33b
|
@ -5,6 +5,7 @@
|
|||
library trace;
|
||||
|
||||
import 'dart:uri';
|
||||
import 'dart:math';
|
||||
|
||||
import 'frame.dart';
|
||||
|
||||
|
@ -116,7 +117,7 @@ class Trace implements StackTrace {
|
|||
if (frames.length == '') return '';
|
||||
|
||||
// Figure out the longest path so we know how much to pad.
|
||||
var longest = frames.map((frame) => frame.location.length).max();
|
||||
var longest = frames.map((frame) => frame.location.length).reduce(max);
|
||||
|
||||
// Print out the stack trace nicely formatted.
|
||||
return frames.map((frame) {
|
||||
|
|
|
@ -114,8 +114,8 @@ class _ObjectArray<E> implements List<E> {
|
|||
return IterableMixinWorkaround.mapList(this, f);
|
||||
}
|
||||
|
||||
reduce(initialValue, combine(previousValue, E element)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
E reduce(E combine(E value, E element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
fold(initialValue, combine(previousValue, E element)) {
|
||||
|
@ -234,10 +234,6 @@ class _ObjectArray<E> implements List<E> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
E min([int compare(E a, E b)]) => IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
E max([int compare(E a, E b)]) => IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
List<E> toList({ bool growable: true}) {
|
||||
return new List<E>.from(this, growable: growable);
|
||||
}
|
||||
|
@ -361,8 +357,8 @@ class _ImmutableArray<E> implements List<E> {
|
|||
return IterableMixinWorkaround.joinList(this, separator);
|
||||
}
|
||||
|
||||
reduce(initialValue, combine(previousValue, E element)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
E reduce(E combine(E value, E element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
fold(initialValue, combine(previousValue, E element)) {
|
||||
|
@ -486,10 +482,6 @@ class _ImmutableArray<E> implements List<E> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
E min([int compare(E a, E b)]) => IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
E max([int compare(E a, E b)]) => IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
List<E> toList({ bool growable: true }) {
|
||||
return new List<E>.from(this, growable: growable);
|
||||
}
|
||||
|
|
|
@ -208,10 +208,6 @@ class _GrowableObjectArray<T> implements List<T> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
T min([int compare(T a, T b)]) => IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
T max([int compare(T a, T b)]) => IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
int indexOf(T element, [int start = 0]) {
|
||||
return IterableMixinWorkaround.indexOfList(this, element, start);
|
||||
}
|
||||
|
@ -264,8 +260,8 @@ class _GrowableObjectArray<T> implements List<T> {
|
|||
return IterableMixinWorkaround.mapList(this, f);
|
||||
}
|
||||
|
||||
reduce(initialValue, combine(previousValue, T element)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
T reduce(T combine(T value, T element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
fold(initialValue, combine(previousValue, T element)) {
|
||||
|
|
|
@ -307,9 +307,8 @@ abstract class _TypedListBase {
|
|||
return IterableMixinWorkaround.join(this, separator);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue,
|
||||
dynamic combine(dynamic initialValue, element)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
dynamic reduce(dynamic combine(value, element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue,
|
||||
|
@ -450,12 +449,6 @@ abstract class _TypedListBase {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void removeRange(int start, int length) {
|
||||
throw new UnsupportedError(
|
||||
"Cannot remove from a non-extendable array");
|
||||
|
|
|
@ -126,46 +126,6 @@ abstract class ListIterable<E> extends Iterable<E> {
|
|||
throw new StateError("No matching element");
|
||||
}
|
||||
|
||||
E min([int compare(E a, E b)]) {
|
||||
if (length == 0) return null;
|
||||
if (compare == null) {
|
||||
var defaultCompare = Comparable.compare;
|
||||
compare = defaultCompare;
|
||||
}
|
||||
E min = elementAt(0);
|
||||
int length = this.length;
|
||||
for (int i = 1; i < length; i++) {
|
||||
E element = elementAt(i);
|
||||
if (compare(min, element) > 0) {
|
||||
min = element;
|
||||
}
|
||||
if (length != this.length) {
|
||||
throw new ConcurrentModificationError(this);
|
||||
}
|
||||
}
|
||||
return min;
|
||||
}
|
||||
|
||||
E max([int compare(E a, E b)]) {
|
||||
if (length == 0) return null;
|
||||
if (compare == null) {
|
||||
var defaultCompare = Comparable.compare;
|
||||
compare = defaultCompare;
|
||||
}
|
||||
E max = elementAt(0);
|
||||
int length = this.length;
|
||||
for (int i = 1; i < length; i++) {
|
||||
E element = elementAt(i);
|
||||
if (compare(max, element) < 0) {
|
||||
max = element;
|
||||
}
|
||||
if (length != this.length) {
|
||||
throw new ConcurrentModificationError(this);
|
||||
}
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
String join([String separator = ""]) {
|
||||
int length = this.length;
|
||||
if (!separator.isEmpty) {
|
||||
|
@ -199,8 +159,13 @@ abstract class ListIterable<E> extends Iterable<E> {
|
|||
|
||||
Iterable map(f(E element)) => new MappedListIterable(this, f);
|
||||
|
||||
reduce(var initialValue, combine(var previousValue, E element)) {
|
||||
return fold(initialValue, combine);
|
||||
E reduce(E combine(var value, E element)) {
|
||||
if (length == 0) throw new StateError("No elements");
|
||||
E value = elementAt(0);
|
||||
for (int i = 1; i < length; i++) {
|
||||
value = combine(value, elementAt(i));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
fold(var initialValue, combine(var previousValue, E element)) {
|
||||
|
@ -663,18 +628,14 @@ class EmptyIterable<E> extends Iterable<E> {
|
|||
throw new StateError("No matching element");
|
||||
}
|
||||
|
||||
E min([int compare(E a, E b)]) => null;
|
||||
|
||||
E max([int compare(E a, E b)]) => null;
|
||||
|
||||
String join([String separator = ""]) => "";
|
||||
|
||||
Iterable<E> where(bool test(E element)) => this;
|
||||
|
||||
Iterable map(f(E element)) => const EmptyIterable();
|
||||
|
||||
reduce(var initialValue, combine(var previousValue, E element)) {
|
||||
return fold(initialValue, combine);
|
||||
E reduce(E combine(E value, E element)) {
|
||||
throw new StateError("No elements");
|
||||
}
|
||||
|
||||
fold(var initialValue, combine(var previousValue, E element)) {
|
||||
|
|
|
@ -120,8 +120,8 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
|
|||
return IterableMixinWorkaround.skipWhile(this, test);
|
||||
}
|
||||
|
||||
reduce(initialValue, combine(previousValue, E element)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
E reduce(E combine(E value, E element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
fold(initialValue, combine(previousValue, E element)) {
|
||||
|
@ -212,10 +212,6 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
E min([int compare(E a, E b)]) => IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
E max([int compare(E a, E b)]) => IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void removeRange(int start, int length) {
|
||||
checkGrowable(this, 'removeRange');
|
||||
if (length == 0) {
|
||||
|
|
|
@ -253,12 +253,36 @@ abstract class Stream<T> {
|
|||
|
||||
/**
|
||||
* Reduces a sequence of values by repeatedly applying [combine].
|
||||
*
|
||||
* *WARNING UPCOMING API-CHANGE*: This method will be changed so that
|
||||
* it doesn't take an initial value. Use [fold] instead.
|
||||
*/
|
||||
Future reduce(var initialValue, combine(var previous, T element)) {
|
||||
return fold(initialValue, combine);
|
||||
Future<T> reduce(T combine(T previous, T element)) {
|
||||
_FutureImpl<T> result = new _FutureImpl<T>();
|
||||
bool seenFirst = false;
|
||||
T value;
|
||||
StreamSubscription subscription;
|
||||
subscription = this.listen(
|
||||
// TODO(ahe): Restore type when feature is implemented in dart2js
|
||||
// checked mode. http://dartbug.com/7733
|
||||
(/* T */ element) {
|
||||
if (seenFirst) {
|
||||
_runUserCode(() => combine(value, element),
|
||||
(T newValue) { value = newValue; },
|
||||
_cancelAndError(subscription, result));
|
||||
} else {
|
||||
value = element;
|
||||
seenFirst = true;
|
||||
}
|
||||
},
|
||||
onError: result._setError,
|
||||
onDone: () {
|
||||
if (!seenFirst) {
|
||||
result._setError(new StateError("No elements"));
|
||||
} else {
|
||||
result._setValue(value);
|
||||
}
|
||||
},
|
||||
unsubscribeOnError: true
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Reduces a sequence of values by repeatedly applying [combine]. */
|
||||
|
@ -272,7 +296,7 @@ abstract class Stream<T> {
|
|||
(/*T*/ element) {
|
||||
_runUserCode(
|
||||
() => combine(value, element),
|
||||
(result) { value = result; },
|
||||
(newValue) { value = newValue; },
|
||||
_cancelAndError(subscription, result)
|
||||
);
|
||||
},
|
||||
|
@ -414,98 +438,6 @@ abstract class Stream<T> {
|
|||
return future;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the least element in the stream.
|
||||
*
|
||||
* If the stream is empty, the result is [:null:].
|
||||
* Otherwise the result is a value from the stream that is not greater
|
||||
* than any other value from the stream (according to [compare], which must
|
||||
* be a [Comparator]).
|
||||
*
|
||||
* If [compare] is omitted, it defaults to [Comparable.compare].
|
||||
*
|
||||
* *Deprecated*. Use [reduce] with a binary min method if needed.
|
||||
*/
|
||||
Future<T> min([int compare(T a, T b)]) {
|
||||
if (compare == null) {
|
||||
var defaultCompare = Comparable.compare;
|
||||
compare = defaultCompare;
|
||||
}
|
||||
_FutureImpl<T> future = new _FutureImpl<T>();
|
||||
StreamSubscription subscription;
|
||||
T min = null;
|
||||
subscription = this.listen(
|
||||
// TODO(ahe): Restore type when feature is implemented in dart2js
|
||||
// checked mode. http://dartbug.com/7733
|
||||
(/*T*/ value) {
|
||||
min = value;
|
||||
subscription.onData((T value) {
|
||||
_runUserCode(
|
||||
() => compare(min, value) > 0,
|
||||
(bool foundSmaller) {
|
||||
if (foundSmaller) {
|
||||
min = value;
|
||||
}
|
||||
},
|
||||
_cancelAndError(subscription, future)
|
||||
);
|
||||
});
|
||||
},
|
||||
onError: future._setError,
|
||||
onDone: () {
|
||||
future._setValue(min);
|
||||
},
|
||||
unsubscribeOnError: true
|
||||
);
|
||||
return future;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the largest element in the stream.
|
||||
*
|
||||
* If the stream is empty, the result is [:null:].
|
||||
* Otherwise the result is an value from the stream that is not smaller
|
||||
* than any other value from the stream (according to [compare], which must
|
||||
* be a [Comparator]).
|
||||
*
|
||||
* If [compare] is omitted, it defaults to [Comparable.compare].
|
||||
*
|
||||
* *Deprecated*. Use [reduce] with a binary max method if needed.
|
||||
*/
|
||||
Future<T> max([int compare(T a, T b)]) {
|
||||
if (compare == null) {
|
||||
var defaultCompare = Comparable.compare;
|
||||
compare = defaultCompare;
|
||||
}
|
||||
_FutureImpl<T> future = new _FutureImpl<T>();
|
||||
StreamSubscription subscription;
|
||||
T max = null;
|
||||
subscription = this.listen(
|
||||
// TODO(ahe): Restore type when feature is implemented in dart2js
|
||||
// checked mode. http://dartbug.com/7733
|
||||
(/*T*/ value) {
|
||||
max = value;
|
||||
subscription.onData((T value) {
|
||||
_runUserCode(
|
||||
() => compare(max, value) < 0,
|
||||
(bool foundGreater) {
|
||||
if (foundGreater) {
|
||||
max = value;
|
||||
}
|
||||
},
|
||||
_cancelAndError(subscription, future)
|
||||
);
|
||||
});
|
||||
},
|
||||
onError: future._setError,
|
||||
onDone: () {
|
||||
future._setValue(max);
|
||||
},
|
||||
unsubscribeOnError: true
|
||||
);
|
||||
return future;
|
||||
}
|
||||
|
||||
/** Reports whether this stream contains any elements. */
|
||||
Future<bool> get isEmpty {
|
||||
_FutureImpl<bool> future = new _FutureImpl<bool>();
|
||||
|
|
|
@ -39,9 +39,14 @@ class IterableMixinWorkaround {
|
|||
}
|
||||
|
||||
static dynamic reduce(Iterable iterable,
|
||||
dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, element)) {
|
||||
return fold(iterable, initialValue, combine);
|
||||
dynamic combine(previousValue, element)) {
|
||||
Iterator iterator = iterable.iterator;
|
||||
if (!iterator.moveNext()) throw new StateError("No elements");
|
||||
var value = iterator.current;
|
||||
while (iterator.moveNext()) {
|
||||
value = combine(value, iterator.current);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
static dynamic fold(Iterable iterable,
|
||||
|
|
|
@ -141,46 +141,6 @@ abstract class ListMixin<E> implements List<E> {
|
|||
throw new StateError("No matching element");
|
||||
}
|
||||
|
||||
E min([int compare(E a, E b)]) {
|
||||
if (length == 0) return null;
|
||||
if (compare == null) {
|
||||
var defaultCompare = Comparable.compare;
|
||||
compare = defaultCompare;
|
||||
}
|
||||
E min = this[0];
|
||||
int length = this.length;
|
||||
for (int i = 1; i < length; i++) {
|
||||
E element = this[i];
|
||||
if (compare(min, element) > 0) {
|
||||
min = element;
|
||||
}
|
||||
if (length != this.length) {
|
||||
throw new ConcurrentModificationError(this);
|
||||
}
|
||||
}
|
||||
return min;
|
||||
}
|
||||
|
||||
E max([int compare(E a, E b)]) {
|
||||
if (length == 0) return null;
|
||||
if (compare == null) {
|
||||
var defaultCompare = Comparable.compare;
|
||||
compare = defaultCompare;
|
||||
}
|
||||
E max = this[0];
|
||||
int length = this.length;
|
||||
for (int i = 1; i < length; i++) {
|
||||
E element = this[i];
|
||||
if (compare(max, element) < 0) {
|
||||
max = element;
|
||||
}
|
||||
if (length != this.length) {
|
||||
throw new ConcurrentModificationError(this);
|
||||
}
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
String join([String separator = ""]) {
|
||||
int length = this.length;
|
||||
if (!separator.isEmpty) {
|
||||
|
@ -214,8 +174,13 @@ abstract class ListMixin<E> implements List<E> {
|
|||
|
||||
Iterable map(f(E element)) => new MappedListIterable(this, f);
|
||||
|
||||
reduce(var initialValue, combine(var previousValue, E element)) {
|
||||
return fold(initialValue, combine);
|
||||
E reduce(E combine(E previousValue, E element)) {
|
||||
if (length == 0) throw new StateError("No elements");
|
||||
E value = this[0];
|
||||
for (int i = 1; i < length; i++) {
|
||||
value = combine(value, this[i]);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
fold(var initialValue, combine(var previousValue, E element)) {
|
||||
|
|
|
@ -93,22 +93,24 @@ abstract class Iterable<E> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Reduce a collection to a single value by iteratively combining each element
|
||||
* of the collection with an existing value using the provided function.
|
||||
* Use [initialValue] as the initial value, and the function [combine] to
|
||||
* create a new value from the previous one and an element.
|
||||
* Reduce a collection to a single value by iteratively combining elements
|
||||
* of the collection using the provided function.
|
||||
*
|
||||
* Example of calculating the sum of an iterable:
|
||||
*
|
||||
* iterable.reduce((prev, element) => prev + element);
|
||||
* iterable.reduce((value, element) => value + element);
|
||||
*
|
||||
* *UPCOMING API-CHANGE*: this method will soon be changed to not take
|
||||
* an initial value: `iterable.reduce(min)`. Use [fold] instead.
|
||||
*/
|
||||
@deprecated
|
||||
dynamic reduce(var initialValue,
|
||||
dynamic combine(var previousValue, E element)) {
|
||||
return fold(initialValue, combine);
|
||||
E reduce(E combine(E value, E element)) {
|
||||
Iterator<E> iterator = this.iterator;
|
||||
if (!iterator.moveNext()) {
|
||||
throw new StateError("No elements");
|
||||
}
|
||||
E value = iterator.current;
|
||||
while (iterator.moveNext()) {
|
||||
value = combine(value, iterator.current);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,7 +121,8 @@ abstract class Iterable<E> {
|
|||
*
|
||||
* Example of calculating the sum of an iterable:
|
||||
*
|
||||
* iterable.fold(0, (prev, element) => prev + element);
|
||||
* iterable.fold(0, (prev, element) => prev + element);
|
||||
*
|
||||
*/
|
||||
dynamic fold(var initialValue,
|
||||
dynamic combine(var previousValue, E element)) {
|
||||
|
@ -182,58 +185,6 @@ abstract class Iterable<E> {
|
|||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the least element in the iterable.
|
||||
*
|
||||
* Returns null if the iterable is empty.
|
||||
* Otherwise returns an element [:x:] of this [Iterable] so that
|
||||
* [:x:] is not greater than [:y:] (that is, [:compare(x, y) <= 0:]) for all
|
||||
* other elements [:y:] in the iterable.
|
||||
*
|
||||
* The [compare] function must be a proper [Comparator<T>]. If a function is
|
||||
* not provided, [compare] defaults to [Comparable.compare].
|
||||
*
|
||||
* *Deprecated*. Use [reduce] with a binary min method if needed.
|
||||
*/
|
||||
@deprecated
|
||||
E min([int compare(E a, E b)]) {
|
||||
if (compare == null) compare = Comparable.compare;
|
||||
Iterator it = iterator;
|
||||
if (!it.moveNext()) return null;
|
||||
E min = it.current;
|
||||
while (it.moveNext()) {
|
||||
E current = it.current;
|
||||
if (compare(min, current) > 0) min = current;
|
||||
}
|
||||
return min;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the largest element in the iterable.
|
||||
*
|
||||
* Returns null if the iterable is empty.
|
||||
* Otherwise returns an element [:x:] of this [Iterable] so that
|
||||
* [:x:] is not smaller than [:y:] (that is, [:compare(x, y) >= 0:]) for all
|
||||
* other elements [:y:] in the iterable.
|
||||
*
|
||||
* The [compare] function must be a proper [Comparator<T>]. If a function is
|
||||
* not provided, [compare] defaults to [Comparable.compare].
|
||||
*
|
||||
* *Deprecated*. Use [reduce] with a binary max method if needed.
|
||||
*/
|
||||
@deprecated
|
||||
E max([int compare(E a, E b)]) {
|
||||
if (compare == null) compare = Comparable.compare;
|
||||
Iterator it = iterator;
|
||||
if (!it.moveNext()) return null;
|
||||
E max = it.current;
|
||||
while (it.moveNext()) {
|
||||
E current = it.current;
|
||||
if (compare(max, current) < 0) max = current;
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if there is no element in this collection.
|
||||
*/
|
||||
|
|
|
@ -6842,11 +6842,12 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
|
|||
return new FixedSizeListIterator<DomMimeType>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, DomMimeType)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
DomMimeType reduce(DomMimeType combine(DomMimeType value, DomMimeType element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, DomMimeType)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, DomMimeType element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -6956,12 +6957,6 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, DomMimeType element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -7117,11 +7112,12 @@ class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> nati
|
|||
return new FixedSizeListIterator<DomPlugin>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, DomPlugin)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
DomPlugin reduce(DomPlugin combine(DomPlugin value, DomPlugin element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, DomPlugin)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, DomPlugin element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -7231,12 +7227,6 @@ class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> nati
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, DomPlugin element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -7540,11 +7530,12 @@ class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
|
|||
return new FixedSizeListIterator<String>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
String reduce(String combine(String value, String element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, String)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, String element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -7654,12 +7645,6 @@ class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
String min([int compare(String a, String b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
String max([int compare(String a, String b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, String element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -7927,9 +7912,8 @@ class _ChildrenElementList extends ListBase<Element> {
|
|||
throw new UnsupportedError('TODO(jacobr): should we impl?');
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Element element)) {
|
||||
return _childElements.reduce(initialValue, combine);
|
||||
Element reduce(Element combine(Element value, Element element)) {
|
||||
return _childElements.reduce(combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue,
|
||||
|
@ -8042,14 +8026,6 @@ class _ChildrenElementList extends ListBase<Element> {
|
|||
return first;
|
||||
}
|
||||
|
||||
Element min([int compare(Element a, Element b)]) {
|
||||
return _childElements.min(compare);
|
||||
}
|
||||
|
||||
Element max([int compare(Element a, Element b)]) {
|
||||
return _childElements.max(compare);
|
||||
}
|
||||
|
||||
Map<int, Element> asMap() {
|
||||
return _childElements.asMap();
|
||||
}
|
||||
|
@ -10301,11 +10277,12 @@ class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
|
|||
return new FixedSizeListIterator<File>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, File)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
File reduce(File combine(File value, File element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, File)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, File element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -10415,12 +10392,6 @@ class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
File min([int compare(File a, File b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
File max([int compare(File a, File b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, File element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -10798,11 +10769,12 @@ class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior
|
|||
return new FixedSizeListIterator<num>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, num)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
num reduce(num combine(num value, num element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, num)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, num element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -10912,12 +10884,6 @@ class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
num min([int compare(num a, num b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
num max([int compare(num a, num b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, num element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -11037,11 +11003,12 @@ class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior
|
|||
return new FixedSizeListIterator<num>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, num)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
num reduce(num combine(num value, num element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, num)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, num element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -11151,12 +11118,6 @@ class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
num min([int compare(num a, num b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
num max([int compare(num a, num b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, num element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -11696,11 +11657,12 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
|
|||
return new FixedSizeListIterator<Node>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Node reduce(Node combine(Node value, Node element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Node element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -11810,12 +11772,6 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Node min([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Node max([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Node element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -11924,11 +11880,12 @@ class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "*
|
|||
return new FixedSizeListIterator<Node>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Node reduce(Node combine(Node value, Node element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Node element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -12038,12 +11995,6 @@ class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "*
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Node min([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Node max([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Node element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -13975,11 +13926,12 @@ class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -14089,12 +14041,6 @@ class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -14214,11 +14160,12 @@ class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -14328,12 +14275,6 @@ class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -14453,11 +14394,12 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -14567,12 +14509,6 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -17487,11 +17423,12 @@ class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeLi
|
|||
return new FixedSizeListIterator<Node>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Node reduce(Node combine(Node value, Node element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Node element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -17601,12 +17538,6 @@ class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeLi
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Node min([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Node max([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Node element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -19844,11 +19775,12 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
|
|||
return new FixedSizeListIterator<SourceBuffer>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SourceBuffer)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
SourceBuffer reduce(SourceBuffer combine(SourceBuffer value, SourceBuffer element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, SourceBuffer)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, SourceBuffer element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -19958,12 +19890,6 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, SourceBuffer element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -20145,11 +20071,12 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGramma
|
|||
return new FixedSizeListIterator<SpeechGrammar>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechGrammar)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
SpeechGrammar reduce(SpeechGrammar combine(SpeechGrammar value, SpeechGrammar element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, SpeechGrammar)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, SpeechGrammar element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -20259,12 +20186,6 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGramma
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, SpeechGrammar element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -21609,11 +21530,12 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
|
|||
return new FixedSizeListIterator<TextTrackCue>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, TextTrackCue)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
TextTrackCue reduce(TextTrackCue combine(TextTrackCue value, TextTrackCue element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, TextTrackCue)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, TextTrackCue element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -21723,12 +21645,6 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, TextTrackCue element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -21835,11 +21751,12 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L
|
|||
return new FixedSizeListIterator<TextTrack>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, TextTrack)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
TextTrack reduce(TextTrack combine(TextTrack value, TextTrack element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, TextTrack)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, TextTrack element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -21949,12 +21866,6 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
TextTrack min([int compare(TextTrack a, TextTrack b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
TextTrack max([int compare(TextTrack a, TextTrack b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, TextTrack element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -22287,11 +22198,12 @@ class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*Touc
|
|||
return new FixedSizeListIterator<Touch>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Touch)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Touch reduce(Touch combine(Touch value, Touch element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Touch)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Touch element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -22401,12 +22313,6 @@ class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*Touc
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Touch min([int compare(Touch a, Touch b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Touch max([int compare(Touch a, Touch b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Touch element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -22776,11 +22682,12 @@ class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -22890,12 +22797,6 @@ class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -23015,11 +22916,12 @@ class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -23129,12 +23031,6 @@ class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -23254,11 +23150,12 @@ class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -23368,12 +23265,6 @@ class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -23490,11 +23381,12 @@ class Uint8ClampedArray extends Uint8Array implements JavaScriptIndexingBehavior
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -23604,12 +23496,6 @@ class Uint8ClampedArray extends Uint8Array implements JavaScriptIndexingBehavior
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -25777,11 +25663,12 @@ class _ClientRectList implements JavaScriptIndexingBehavior, List<Rect> native "
|
|||
return new FixedSizeListIterator<Rect>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Rect)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Rect reduce(Rect combine(Rect value, Rect element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Rect)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Rect element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -25891,12 +25778,6 @@ class _ClientRectList implements JavaScriptIndexingBehavior, List<Rect> native "
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Rect min([int compare(Rect a, Rect b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Rect max([int compare(Rect a, Rect b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Rect element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -26004,11 +25885,12 @@ class _CssRuleList implements JavaScriptIndexingBehavior, List<CssRule> native "
|
|||
return new FixedSizeListIterator<CssRule>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, CssRule)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
CssRule reduce(CssRule combine(CssRule value, CssRule element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, CssRule)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, CssRule element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -26118,12 +26000,6 @@ class _CssRuleList implements JavaScriptIndexingBehavior, List<CssRule> native "
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
CssRule min([int compare(CssRule a, CssRule b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
CssRule max([int compare(CssRule a, CssRule b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, CssRule element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -26222,11 +26098,12 @@ class _CssValueList extends _CSSValue implements JavaScriptIndexingBehavior, Lis
|
|||
return new FixedSizeListIterator<_CSSValue>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, _CSSValue)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
_CSSValue reduce(_CSSValue combine(_CSSValue value, _CSSValue element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, _CSSValue)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, _CSSValue element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -26336,12 +26213,6 @@ class _CssValueList extends _CSSValue implements JavaScriptIndexingBehavior, Lis
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
_CSSValue min([int compare(_CSSValue a, _CSSValue b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
_CSSValue max([int compare(_CSSValue a, _CSSValue b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, _CSSValue element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -26508,11 +26379,12 @@ class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*En
|
|||
return new FixedSizeListIterator<Entry>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Entry)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Entry reduce(Entry combine(Entry value, Entry element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Entry)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Entry element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -26622,12 +26494,6 @@ class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*En
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Entry min([int compare(Entry a, Entry b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Entry max([int compare(Entry a, Entry b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Entry element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -26726,11 +26592,12 @@ class _EntryArraySync implements JavaScriptIndexingBehavior, List<_EntrySync> na
|
|||
return new FixedSizeListIterator<_EntrySync>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, _EntrySync)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
_EntrySync reduce(_EntrySync combine(_EntrySync value, _EntrySync element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, _EntrySync)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, _EntrySync element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -26840,12 +26707,6 @@ class _EntryArraySync implements JavaScriptIndexingBehavior, List<_EntrySync> na
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
_EntrySync min([int compare(_EntrySync a, _EntrySync b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
_EntrySync max([int compare(_EntrySync a, _EntrySync b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, _EntrySync element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -26987,11 +26848,12 @@ class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "
|
|||
return new FixedSizeListIterator<Gamepad>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Gamepad)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Gamepad reduce(Gamepad combine(Gamepad value, Gamepad element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Gamepad)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Gamepad element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -27101,12 +26963,6 @@ class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Gamepad min([int compare(Gamepad a, Gamepad b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Gamepad max([int compare(Gamepad a, Gamepad b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Gamepad element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -27268,11 +27124,12 @@ class _NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*N
|
|||
return new FixedSizeListIterator<Node>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Node reduce(Node combine(Node value, Node element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Node element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -27382,12 +27239,6 @@ class _NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*N
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Node min([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Node max([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Node element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -27557,11 +27408,12 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechI
|
|||
return new FixedSizeListIterator<SpeechInputResult>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechInputResult)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
SpeechInputResult reduce(SpeechInputResult combine(SpeechInputResult value, SpeechInputResult element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, SpeechInputResult)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, SpeechInputResult element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -27671,12 +27523,6 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechI
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, SpeechInputResult element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -27775,11 +27621,12 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
|
|||
return new FixedSizeListIterator<SpeechRecognitionResult>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechRecognitionResult)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
SpeechRecognitionResult reduce(SpeechRecognitionResult combine(SpeechRecognitionResult value, SpeechRecognitionResult element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, SpeechRecognitionResult)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, SpeechRecognitionResult element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -27889,12 +27736,6 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, SpeechRecognitionResult element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -27993,11 +27834,12 @@ class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> na
|
|||
return new FixedSizeListIterator<StyleSheet>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, StyleSheet)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
StyleSheet reduce(StyleSheet combine(StyleSheet value, StyleSheet element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, StyleSheet)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, StyleSheet element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -28107,12 +27949,6 @@ class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> na
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, StyleSheet element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -28723,9 +28559,8 @@ abstract class CssClassSet implements Set<String> {
|
|||
|
||||
int get length => readClasses().length;
|
||||
|
||||
dynamic reduce(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, String element)) {
|
||||
return readClasses().reduce(initialValue, combine);
|
||||
String reduce(String combine(String value, String element)) {
|
||||
return readClasses().reduce(combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue,
|
||||
|
@ -28835,10 +28670,6 @@ abstract class CssClassSet implements Set<String> {
|
|||
List<String> toList({ bool growable: true }) =>
|
||||
readClasses().toList(growable: growable);
|
||||
Set<String> toSet() => readClasses().toSet();
|
||||
String min([int compare(String a, String b)]) =>
|
||||
readClasses().min(compare);
|
||||
String max([int compare(String a, String b)]) =>
|
||||
readClasses().max(compare);
|
||||
Iterable<String> take(int n) => readClasses().take(n);
|
||||
Iterable<String> takeWhile(bool test(String value)) =>
|
||||
readClasses().takeWhile(test);
|
||||
|
@ -31205,8 +31036,8 @@ class _WrappedList<E> implements List<E> {
|
|||
|
||||
void forEach(void f(E element)) { _list.forEach(f); }
|
||||
|
||||
dynamic reduce(initialValue, combine(previousValue, E element)) =>
|
||||
_list.reduce(initialValue, combine);
|
||||
E reduce(E combine(E value, E element)) =>
|
||||
_list.reduce(combine);
|
||||
|
||||
dynamic fold(initialValue, combine(previousValue, E element)) =>
|
||||
_list.fold(initialValue, combine);
|
||||
|
@ -31224,10 +31055,6 @@ class _WrappedList<E> implements List<E> {
|
|||
|
||||
int get length => _list.length;
|
||||
|
||||
E min([int compare(E a, E b)]) => _list.min(compare);
|
||||
|
||||
E max([int compare(E a, E b)]) => _list.max(compare);
|
||||
|
||||
bool get isEmpty => _list.isEmpty;
|
||||
|
||||
Iterable<E> take(int n) => _list.take(n);
|
||||
|
|
|
@ -7413,11 +7413,12 @@ class DomMimeTypeArray extends NativeFieldWrapperClass1 implements List<DomMimeT
|
|||
return new FixedSizeListIterator<DomMimeType>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, DomMimeType)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
DomMimeType reduce(DomMimeType combine(DomMimeType value, DomMimeType element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, DomMimeType)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, DomMimeType element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -7527,12 +7528,6 @@ class DomMimeTypeArray extends NativeFieldWrapperClass1 implements List<DomMimeT
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, DomMimeType element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -7702,11 +7697,12 @@ class DomPluginArray extends NativeFieldWrapperClass1 implements List<DomPlugin>
|
|||
return new FixedSizeListIterator<DomPlugin>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, DomPlugin)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
DomPlugin reduce(DomPlugin combine(DomPlugin value, DomPlugin element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, DomPlugin)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, DomPlugin element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -7816,12 +7812,6 @@ class DomPluginArray extends NativeFieldWrapperClass1 implements List<DomPlugin>
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, DomPlugin element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -8143,11 +8133,12 @@ class DomStringList extends NativeFieldWrapperClass1 implements List<String> {
|
|||
return new FixedSizeListIterator<String>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
String reduce(String combine(String value, String element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, String)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, String element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -8257,12 +8248,6 @@ class DomStringList extends NativeFieldWrapperClass1 implements List<String> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
String min([int compare(String a, String b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
String max([int compare(String a, String b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, String element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -8551,9 +8536,8 @@ class _ChildrenElementList extends ListBase<Element> {
|
|||
throw new UnsupportedError('TODO(jacobr): should we impl?');
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Element element)) {
|
||||
return _childElements.reduce(initialValue, combine);
|
||||
Element reduce(Element combine(Element value, Element element)) {
|
||||
return _childElements.reduce(combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue,
|
||||
|
@ -8666,14 +8650,6 @@ class _ChildrenElementList extends ListBase<Element> {
|
|||
return first;
|
||||
}
|
||||
|
||||
Element min([int compare(Element a, Element b)]) {
|
||||
return _childElements.min(compare);
|
||||
}
|
||||
|
||||
Element max([int compare(Element a, Element b)]) {
|
||||
return _childElements.max(compare);
|
||||
}
|
||||
|
||||
Map<int, Element> asMap() {
|
||||
return _childElements.asMap();
|
||||
}
|
||||
|
@ -10851,11 +10827,12 @@ class FileList extends NativeFieldWrapperClass1 implements List<File> {
|
|||
return new FixedSizeListIterator<File>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, File)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
File reduce(File combine(File value, File element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, File)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, File element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -10965,12 +10942,6 @@ class FileList extends NativeFieldWrapperClass1 implements List<File> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
File min([int compare(File a, File b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
File max([int compare(File a, File b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, File element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -11378,11 +11349,12 @@ class Float32Array extends ArrayBufferView implements List<double> {
|
|||
return new FixedSizeListIterator<num>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, num)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
num reduce(num combine(num value, num element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, num)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, num element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -11492,12 +11464,6 @@ class Float32Array extends ArrayBufferView implements List<double> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
num min([int compare(num a, num b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
num max([int compare(num a, num b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, num element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -11634,11 +11600,12 @@ class Float64Array extends ArrayBufferView implements List<double> {
|
|||
return new FixedSizeListIterator<num>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, num)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
num reduce(num combine(num value, num element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, num)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, num element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -11748,12 +11715,6 @@ class Float64Array extends ArrayBufferView implements List<double> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
num min([int compare(num a, num b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
num max([int compare(num a, num b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, num element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -12339,11 +12300,12 @@ class HtmlAllCollection extends NativeFieldWrapperClass1 implements List<Node> {
|
|||
return new FixedSizeListIterator<Node>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Node reduce(Node combine(Node value, Node element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Node element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -12453,12 +12415,6 @@ class HtmlAllCollection extends NativeFieldWrapperClass1 implements List<Node> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Node min([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Node max([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Node element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -12569,11 +12525,12 @@ class HtmlCollection extends NativeFieldWrapperClass1 implements List<Node> {
|
|||
return new FixedSizeListIterator<Node>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Node reduce(Node combine(Node value, Node element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Node element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -12683,12 +12640,6 @@ class HtmlCollection extends NativeFieldWrapperClass1 implements List<Node> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Node min([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Node max([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Node element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -14955,11 +14906,12 @@ class Int16Array extends ArrayBufferView implements List<int> {
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -15069,12 +15021,6 @@ class Int16Array extends ArrayBufferView implements List<int> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -15211,11 +15157,12 @@ class Int32Array extends ArrayBufferView implements List<int> {
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -15325,12 +15272,6 @@ class Int32Array extends ArrayBufferView implements List<int> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -15467,11 +15408,12 @@ class Int8Array extends ArrayBufferView implements List<int> {
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -15581,12 +15523,6 @@ class Int8Array extends ArrayBufferView implements List<int> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -18793,11 +18729,12 @@ class NodeList extends NativeFieldWrapperClass1 implements List<Node> {
|
|||
return new FixedSizeListIterator<Node>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Node reduce(Node combine(Node value, Node element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Node element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -18907,12 +18844,6 @@ class NodeList extends NativeFieldWrapperClass1 implements List<Node> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Node min([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Node max([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Node element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -21433,11 +21364,12 @@ class SourceBufferList extends EventTarget implements List<SourceBuffer> {
|
|||
return new FixedSizeListIterator<SourceBuffer>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SourceBuffer)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
SourceBuffer reduce(SourceBuffer combine(SourceBuffer value, SourceBuffer element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, SourceBuffer)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, SourceBuffer element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -21547,12 +21479,6 @@ class SourceBufferList extends EventTarget implements List<SourceBuffer> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, SourceBuffer element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -21772,11 +21698,12 @@ class SpeechGrammarList extends NativeFieldWrapperClass1 implements List<SpeechG
|
|||
return new FixedSizeListIterator<SpeechGrammar>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechGrammar)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
SpeechGrammar reduce(SpeechGrammar combine(SpeechGrammar value, SpeechGrammar element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, SpeechGrammar)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, SpeechGrammar element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -21886,12 +21813,6 @@ class SpeechGrammarList extends NativeFieldWrapperClass1 implements List<SpeechG
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, SpeechGrammar element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -23526,11 +23447,12 @@ class TextTrackCueList extends NativeFieldWrapperClass1 implements List<TextTrac
|
|||
return new FixedSizeListIterator<TextTrackCue>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, TextTrackCue)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
TextTrackCue reduce(TextTrackCue combine(TextTrackCue value, TextTrackCue element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, TextTrackCue)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, TextTrackCue element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -23640,12 +23562,6 @@ class TextTrackCueList extends NativeFieldWrapperClass1 implements List<TextTrac
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, TextTrackCue element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -23756,11 +23672,12 @@ class TextTrackList extends EventTarget implements List<TextTrack> {
|
|||
return new FixedSizeListIterator<TextTrack>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, TextTrack)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
TextTrack reduce(TextTrack combine(TextTrack value, TextTrack element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, TextTrack)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, TextTrack element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -23870,12 +23787,6 @@ class TextTrackList extends EventTarget implements List<TextTrack> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
TextTrack min([int compare(TextTrack a, TextTrack b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
TextTrack max([int compare(TextTrack a, TextTrack b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, TextTrack element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -24203,11 +24114,12 @@ class TouchList extends NativeFieldWrapperClass1 implements List<Touch> {
|
|||
return new FixedSizeListIterator<Touch>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Touch)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Touch reduce(Touch combine(Touch value, Touch element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Touch)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Touch element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -24317,12 +24229,6 @@ class TouchList extends NativeFieldWrapperClass1 implements List<Touch> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Touch min([int compare(Touch a, Touch b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Touch max([int compare(Touch a, Touch b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Touch element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -24733,11 +24639,12 @@ class Uint16Array extends ArrayBufferView implements List<int> {
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -24847,12 +24754,6 @@ class Uint16Array extends ArrayBufferView implements List<int> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -24989,11 +24890,12 @@ class Uint32Array extends ArrayBufferView implements List<int> {
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -25103,12 +25005,6 @@ class Uint32Array extends ArrayBufferView implements List<int> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -25245,11 +25141,12 @@ class Uint8Array extends ArrayBufferView implements List<int> {
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -25359,12 +25256,6 @@ class Uint8Array extends ArrayBufferView implements List<int> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -25499,11 +25390,12 @@ class Uint8ClampedArray extends Uint8Array implements List<int> {
|
|||
return new FixedSizeListIterator<int>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
int reduce(int combine(int value, int element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, int)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, int element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -25613,12 +25505,6 @@ class Uint8ClampedArray extends Uint8Array implements List<int> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
int min([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
int max([int compare(int a, int b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, int element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -27618,11 +27504,12 @@ class _ClientRectList extends NativeFieldWrapperClass1 implements List<Rect> {
|
|||
return new FixedSizeListIterator<Rect>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Rect)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Rect reduce(Rect combine(Rect value, Rect element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Rect)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Rect element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -27732,12 +27619,6 @@ class _ClientRectList extends NativeFieldWrapperClass1 implements List<Rect> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Rect min([int compare(Rect a, Rect b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Rect max([int compare(Rect a, Rect b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Rect element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -27853,11 +27734,12 @@ class _CssRuleList extends NativeFieldWrapperClass1 implements List<CssRule> {
|
|||
return new FixedSizeListIterator<CssRule>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, CssRule)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
CssRule reduce(CssRule combine(CssRule value, CssRule element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, CssRule)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, CssRule element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -27967,12 +27849,6 @@ class _CssRuleList extends NativeFieldWrapperClass1 implements List<CssRule> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
CssRule min([int compare(CssRule a, CssRule b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
CssRule max([int compare(CssRule a, CssRule b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, CssRule element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -28075,11 +27951,12 @@ class _CssValueList extends _CSSValue implements List<_CSSValue> {
|
|||
return new FixedSizeListIterator<_CSSValue>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, _CSSValue)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
_CSSValue reduce(_CSSValue combine(_CSSValue value, _CSSValue element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, _CSSValue)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, _CSSValue element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -28189,12 +28066,6 @@ class _CssValueList extends _CSSValue implements List<_CSSValue> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
_CSSValue min([int compare(_CSSValue a, _CSSValue b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
_CSSValue max([int compare(_CSSValue a, _CSSValue b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, _CSSValue element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -28533,11 +28404,12 @@ class _EntryArray extends NativeFieldWrapperClass1 implements List<Entry> {
|
|||
return new FixedSizeListIterator<Entry>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Entry)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Entry reduce(Entry combine(Entry value, Entry element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Entry)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Entry element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -28647,12 +28519,6 @@ class _EntryArray extends NativeFieldWrapperClass1 implements List<Entry> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Entry min([int compare(Entry a, Entry b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Entry max([int compare(Entry a, Entry b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Entry element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -28755,11 +28621,12 @@ class _EntryArraySync extends NativeFieldWrapperClass1 implements List<_EntrySyn
|
|||
return new FixedSizeListIterator<_EntrySync>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, _EntrySync)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
_EntrySync reduce(_EntrySync combine(_EntrySync value, _EntrySync element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, _EntrySync)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, _EntrySync element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -28869,12 +28736,6 @@ class _EntryArraySync extends NativeFieldWrapperClass1 implements List<_EntrySyn
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
_EntrySync min([int compare(_EntrySync a, _EntrySync b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
_EntrySync max([int compare(_EntrySync a, _EntrySync b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, _EntrySync element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -29038,11 +28899,12 @@ class _GamepadList extends NativeFieldWrapperClass1 implements List<Gamepad> {
|
|||
return new FixedSizeListIterator<Gamepad>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Gamepad)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Gamepad reduce(Gamepad combine(Gamepad value, Gamepad element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Gamepad)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Gamepad element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -29152,12 +29014,6 @@ class _GamepadList extends NativeFieldWrapperClass1 implements List<Gamepad> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Gamepad min([int compare(Gamepad a, Gamepad b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Gamepad max([int compare(Gamepad a, Gamepad b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Gamepad element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -29351,11 +29207,12 @@ class _NamedNodeMap extends NativeFieldWrapperClass1 implements List<Node> {
|
|||
return new FixedSizeListIterator<Node>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Node reduce(Node combine(Node value, Node element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Node)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Node element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -29465,12 +29322,6 @@ class _NamedNodeMap extends NativeFieldWrapperClass1 implements List<Node> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Node min([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Node max([int compare(Node a, Node b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Node element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -29658,11 +29509,12 @@ class _SpeechInputResultList extends NativeFieldWrapperClass1 implements List<Sp
|
|||
return new FixedSizeListIterator<SpeechInputResult>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechInputResult)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
SpeechInputResult reduce(SpeechInputResult combine(SpeechInputResult value, SpeechInputResult element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, SpeechInputResult)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, SpeechInputResult element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -29772,12 +29624,6 @@ class _SpeechInputResultList extends NativeFieldWrapperClass1 implements List<Sp
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, SpeechInputResult element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -29880,11 +29726,12 @@ class _SpeechRecognitionResultList extends NativeFieldWrapperClass1 implements L
|
|||
return new FixedSizeListIterator<SpeechRecognitionResult>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, SpeechRecognitionResult)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
SpeechRecognitionResult reduce(SpeechRecognitionResult combine(SpeechRecognitionResult value, SpeechRecognitionResult element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, SpeechRecognitionResult)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, SpeechRecognitionResult element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -29994,12 +29841,6 @@ class _SpeechRecognitionResultList extends NativeFieldWrapperClass1 implements L
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, SpeechRecognitionResult element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -30102,11 +29943,12 @@ class _StyleSheetList extends NativeFieldWrapperClass1 implements List<StyleShee
|
|||
return new FixedSizeListIterator<StyleSheet>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, StyleSheet)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
StyleSheet reduce(StyleSheet combine(StyleSheet value, StyleSheet element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, StyleSheet)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, StyleSheet element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -30216,12 +30058,6 @@ class _StyleSheetList extends NativeFieldWrapperClass1 implements List<StyleShee
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, StyleSheet element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -30860,9 +30696,8 @@ abstract class CssClassSet implements Set<String> {
|
|||
|
||||
int get length => readClasses().length;
|
||||
|
||||
dynamic reduce(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, String element)) {
|
||||
return readClasses().reduce(initialValue, combine);
|
||||
String reduce(String combine(String value, String element)) {
|
||||
return readClasses().reduce(combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue,
|
||||
|
@ -30972,10 +30807,6 @@ abstract class CssClassSet implements Set<String> {
|
|||
List<String> toList({ bool growable: true }) =>
|
||||
readClasses().toList(growable: growable);
|
||||
Set<String> toSet() => readClasses().toSet();
|
||||
String min([int compare(String a, String b)]) =>
|
||||
readClasses().min(compare);
|
||||
String max([int compare(String a, String b)]) =>
|
||||
readClasses().max(compare);
|
||||
Iterable<String> take(int n) => readClasses().take(n);
|
||||
Iterable<String> takeWhile(bool test(String value)) =>
|
||||
readClasses().takeWhile(test);
|
||||
|
@ -32760,8 +32591,8 @@ class _WrappedList<E> implements List<E> {
|
|||
|
||||
void forEach(void f(E element)) { _list.forEach(f); }
|
||||
|
||||
dynamic reduce(initialValue, combine(previousValue, E element)) =>
|
||||
_list.reduce(initialValue, combine);
|
||||
E reduce(E combine(E value, E element)) =>
|
||||
_list.reduce(combine);
|
||||
|
||||
dynamic fold(initialValue, combine(previousValue, E element)) =>
|
||||
_list.fold(initialValue, combine);
|
||||
|
@ -32779,10 +32610,6 @@ class _WrappedList<E> implements List<E> {
|
|||
|
||||
int get length => _list.length;
|
||||
|
||||
E min([int compare(E a, E b)]) => _list.min(compare);
|
||||
|
||||
E max([int compare(E a, E b)]) => _list.max(compare);
|
||||
|
||||
bool get isEmpty => _list.isEmpty;
|
||||
|
||||
Iterable<E> take(int n) => _list.take(n);
|
||||
|
|
|
@ -141,14 +141,13 @@ class FilteredElementList extends ListBase<Element> {
|
|||
IterableMixinWorkaround.retainWhere(this, test);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Element element)) {
|
||||
return _filtered.reduce(initialValue, combine);
|
||||
Element reduce(Element combine(Element value, Element element)) {
|
||||
return _filtered.reduce(combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Element element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
return _filtered.fold(initialValue, combine);
|
||||
}
|
||||
|
||||
bool every(bool f(Element element)) => _filtered.every(f);
|
||||
|
|
|
@ -3030,11 +3030,12 @@ class LengthList implements JavaScriptIndexingBehavior, List<Length> native "*SV
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Length)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Length reduce(Length combine(Length value, Length element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Length)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Length element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -3142,12 +3143,6 @@ class LengthList implements JavaScriptIndexingBehavior, List<Length> native "*SV
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Length min([int compare(Length a, Length b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Length max([int compare(Length a, Length b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Length element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -3675,11 +3670,12 @@ class NumberList implements JavaScriptIndexingBehavior, List<Number> native "*SV
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Number)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Number reduce(Number combine(Number value, Number element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Number)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Number element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -3787,12 +3783,6 @@ class NumberList implements JavaScriptIndexingBehavior, List<Number> native "*SV
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Number min([int compare(Number a, Number b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Number max([int compare(Number a, Number b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Number element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -4551,11 +4541,12 @@ class PathSegList implements JavaScriptIndexingBehavior, List<PathSeg> native "*
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, PathSeg)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
PathSeg reduce(PathSeg combine(PathSeg value, PathSeg element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, PathSeg)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, PathSeg element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -4663,12 +4654,6 @@ class PathSegList implements JavaScriptIndexingBehavior, List<PathSeg> native "*
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
PathSeg min([int compare(PathSeg a, PathSeg b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
PathSeg max([int compare(PathSeg a, PathSeg b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, PathSeg element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -5457,11 +5442,12 @@ class StringList implements JavaScriptIndexingBehavior, List<String> native "*SV
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
String reduce(String combine(String value, String element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, String)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, String element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -5569,12 +5555,6 @@ class StringList implements JavaScriptIndexingBehavior, List<String> native "*SV
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
String min([int compare(String a, String b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
String max([int compare(String a, String b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, String element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -6636,11 +6616,12 @@ class TransformList implements List<Transform>, JavaScriptIndexingBehavior nativ
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Transform)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Transform reduce(Transform combine(Transform value, Transform element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Transform)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Transform element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -6748,12 +6729,6 @@ class TransformList implements List<Transform>, JavaScriptIndexingBehavior nativ
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Transform min([int compare(Transform a, Transform b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Transform max([int compare(Transform a, Transform b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Transform element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -7174,11 +7149,12 @@ class _ElementInstanceList implements JavaScriptIndexingBehavior, List<ElementIn
|
|||
return new FixedSizeListIterator<ElementInstance>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, ElementInstance)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
ElementInstance reduce(ElementInstance combine(ElementInstance value, ElementInstance element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, ElementInstance)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, ElementInstance element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -7288,12 +7264,6 @@ class _ElementInstanceList implements JavaScriptIndexingBehavior, List<ElementIn
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, ElementInstance element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
|
|
@ -3291,11 +3291,12 @@ class LengthList extends NativeFieldWrapperClass1 implements List<Length> {
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Length)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Length reduce(Length combine(Length value, Length element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Length)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Length element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -3403,12 +3404,6 @@ class LengthList extends NativeFieldWrapperClass1 implements List<Length> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Length min([int compare(Length a, Length b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Length max([int compare(Length a, Length b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Length element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -4013,11 +4008,12 @@ class NumberList extends NativeFieldWrapperClass1 implements List<Number> {
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Number)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Number reduce(Number combine(Number value, Number element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Number)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Number element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -4125,12 +4121,6 @@ class NumberList extends NativeFieldWrapperClass1 implements List<Number> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Number min([int compare(Number a, Number b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Number max([int compare(Number a, Number b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Number element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -5162,11 +5152,12 @@ class PathSegList extends NativeFieldWrapperClass1 implements List<PathSeg> {
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, PathSeg)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
PathSeg reduce(PathSeg combine(PathSeg value, PathSeg element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, PathSeg)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, PathSeg element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -5274,12 +5265,6 @@ class PathSegList extends NativeFieldWrapperClass1 implements List<PathSeg> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
PathSeg min([int compare(PathSeg a, PathSeg b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
PathSeg max([int compare(PathSeg a, PathSeg b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, PathSeg element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -6165,11 +6150,12 @@ class StringList extends NativeFieldWrapperClass1 implements List<String> {
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
String reduce(String combine(String value, String element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, String)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, String element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -6277,12 +6263,6 @@ class StringList extends NativeFieldWrapperClass1 implements List<String> {
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
String min([int compare(String a, String b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
String max([int compare(String a, String b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, String element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -7433,11 +7413,12 @@ class TransformList extends NativeFieldWrapperClass1 implements List<Transform>
|
|||
|
||||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Transform)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Transform reduce(Transform combine(Transform value, Transform element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Transform)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Transform element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -7545,12 +7526,6 @@ class TransformList extends NativeFieldWrapperClass1 implements List<Transform>
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Transform min([int compare(Transform a, Transform b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Transform max([int compare(Transform a, Transform b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Transform element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
@ -8025,11 +8000,12 @@ class _ElementInstanceList extends NativeFieldWrapperClass1 implements List<Elem
|
|||
return new FixedSizeListIterator<ElementInstance>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, ElementInstance)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
ElementInstance reduce(ElementInstance combine(ElementInstance value, ElementInstance element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, ElementInstance)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, ElementInstance element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -8139,12 +8115,6 @@ class _ElementInstanceList extends NativeFieldWrapperClass1 implements List<Elem
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, ElementInstance element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
|
|
@ -223,11 +223,12 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
|
|||
return new FixedSizeListIterator<Map>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Map reduce(Map combine(Map value, Map element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Map)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Map element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -337,12 +338,6 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Map min([int compare(Map a, Map b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Map max([int compare(Map a, Map b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Map element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
|
|
@ -241,11 +241,12 @@ class SqlResultSetRowList extends NativeFieldWrapperClass1 implements List<Map>
|
|||
return new FixedSizeListIterator<Map>(this);
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Map)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
Map reduce(Map combine(Map value, Map element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, Map)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Map element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -355,12 +356,6 @@ class SqlResultSetRowList extends NativeFieldWrapperClass1 implements List<Map>
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Map min([int compare(Map a, Map b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
Map max([int compare(Map a, Map b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, Map element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
library iterable_min_max_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import "dart:collection";
|
||||
|
||||
class C {
|
||||
final x;
|
||||
const C(this.x);
|
||||
int get hashCode => x.hashCode;
|
||||
bool operator==(var other) => other is C && x == other.x;
|
||||
}
|
||||
|
||||
const inf = double.INFINITY;
|
||||
|
||||
var intList = const [0, 1, -1, -5, 5, -1000, 1000, -7, 7];
|
||||
var doubleList = const [-0.0, 0.0, -1.0, 1.0, -1000.0, 1000.0, -inf, inf];
|
||||
var stringList = const ["bbb", "bba", "bab", "abb", "bbc", "bcb", "cbb", "bb"];
|
||||
var cList = const [const C(5), const C(3), const C(8),
|
||||
const C(0), const C(10), const C(6)];
|
||||
int compareC(C a, C b) => a.x.compareTo(b.x);
|
||||
|
||||
|
||||
testMinMax(iterable, min, max) {
|
||||
Expect.equals(min, iterable.min());
|
||||
Expect.equals(min, iterable.min(Comparable.compare));
|
||||
Expect.equals(max, iterable.min((a, b) => Comparable.compare(b, a)));
|
||||
|
||||
Expect.equals(max, iterable.max());
|
||||
Expect.equals(max, iterable.max(Comparable.compare));
|
||||
Expect.equals(min, iterable.max((a, b) => Comparable.compare(b, a)));
|
||||
}
|
||||
|
||||
|
||||
main() {
|
||||
testMinMax(const [], null, null);
|
||||
testMinMax([], null, null);
|
||||
testMinMax(new Set(), null, null);
|
||||
|
||||
testMinMax(intList, -1000, 1000); // Const list.
|
||||
testMinMax(new List.from(intList), -1000, 1000); // Non-const list.
|
||||
testMinMax(new Set.from(intList), -1000, 1000); // Set.
|
||||
|
||||
testMinMax(doubleList, -inf, inf);
|
||||
testMinMax(new List.from(doubleList), -inf, inf);
|
||||
testMinMax(new Set.from(doubleList), -inf, inf);
|
||||
|
||||
testMinMax(stringList, "abb", "cbb");
|
||||
testMinMax(new List.from(stringList), "abb", "cbb");
|
||||
testMinMax(new Set.from(stringList), "abb", "cbb");
|
||||
|
||||
// Objects that are not Comparable.
|
||||
Expect.equals(const C(0), cList.min(compareC));
|
||||
Expect.equals(const C(0), new List.from(cList).min(compareC));
|
||||
Expect.equals(const C(0), new Set.from(cList).min(compareC));
|
||||
|
||||
Expect.equals(const C(10), cList.max(compareC));
|
||||
Expect.equals(const C(10), new List.from(cList).max(compareC));
|
||||
Expect.equals(const C(10), new Set.from(cList).max(compareC));
|
||||
|
||||
bool checkedMode = false;
|
||||
assert(checkedMode = true);
|
||||
Expect.throws(cList.min, (e) => checkedMode ? e is TypeError
|
||||
: e is NoSuchMethodError);
|
||||
Expect.throws(cList.max, (e) => checkedMode ? e is TypeError
|
||||
: e is NoSuchMethodError);
|
||||
}
|
|
@ -114,9 +114,7 @@ void testOperations() {
|
|||
testOp((i) => i.any((n) => n < 10), "any<10");
|
||||
testOp((i) => i.every((n) => n < 5), "every<5");
|
||||
testOp((i) => i.every((n) => n < 10), "every<10");
|
||||
testOp((i) => i.max(), "max");
|
||||
testOp((i) => i.min(), "min");
|
||||
testOp((i) => i.reduce(0, (a, b) => a + b), "reduce-sum");
|
||||
testOp((i) => i.reduce((a, b) => a + b), "reduce-sum");
|
||||
testOp((i) => i.fold(0, (a, b) => a + b), "fold-sum");
|
||||
testOp((i) => i.join("-"), "join-");
|
||||
testOp((i) => i.join(""), "join");
|
||||
|
|
|
@ -106,9 +106,7 @@ void testOperations() {
|
|||
testOp((i) => i.any((n) => n < 10), "any<10");
|
||||
testOp((i) => i.every((n) => n < 5), "every<5");
|
||||
testOp((i) => i.every((n) => n < 10), "every<10");
|
||||
testOp((i) => i.max(), "max");
|
||||
testOp((i) => i.min(), "min");
|
||||
testOp((i) => i.reduce(0, (a, b) => a + b), "reduce-sum");
|
||||
testOp((i) => i.reduce((a, b) => a + b), "reduce-sum");
|
||||
testOp((i) => i.fold(0, (a, b) => a + b), "fold-sum");
|
||||
testOp((i) => i.join("-"), "join-");
|
||||
testOp((i) => i.join(""), "join");
|
||||
|
|
|
@ -191,7 +191,7 @@ main() {
|
|||
});
|
||||
|
||||
test('reduce', () {
|
||||
stream.reduce(null, (a, b) => null).then((_) {});
|
||||
stream.reduce((a, b) => null).then((_) {});
|
||||
});
|
||||
|
||||
test('fold', () {
|
||||
|
@ -214,14 +214,6 @@ main() {
|
|||
stream.length.then((_) {});
|
||||
});
|
||||
|
||||
test('min', () {
|
||||
stream.min((a, b) => 0).then((_) {});
|
||||
});
|
||||
|
||||
test('max', () {
|
||||
stream.max((a, b) => 0).then((_) {});
|
||||
});
|
||||
|
||||
test('isEmpty', () {
|
||||
stream.isEmpty.then((_) {});
|
||||
});
|
||||
|
|
|
@ -432,7 +432,7 @@ testRethrow() {
|
|||
Future f = streamValueTransform(c.stream, (v) { throw error; });
|
||||
f.then((v) { Expect.fail("unreachable"); },
|
||||
onError: expectAsync1((e) { Expect.identical(error, e); }));
|
||||
// Need two values to trigger compare for min/max.
|
||||
// Need two values to trigger compare for reduce.
|
||||
c.add(0);
|
||||
c.add(1);
|
||||
c.close();
|
||||
|
@ -447,9 +447,7 @@ testRethrow() {
|
|||
testStreamError("handleTest", (s, act) => s.handleError((v) {}, test: act));
|
||||
testFuture("every", (s, act) => s.every(act));
|
||||
testFuture("any", (s, act) => s.any(act));
|
||||
testFuture("min", (s, act) => s.min((a, b) => act(b)));
|
||||
testFuture("max", (s, act) => s.max((a, b) => act(b)));
|
||||
testFuture("reduce", (s, act) => s.reduce(0, (a,b) => act(b)));
|
||||
testFuture("reduce", (s, act) => s.reduce((a,b) => act(b)));
|
||||
testFuture("fold", (s, act) => s.fold(0, (a,b) => act(b)));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
library stream_min_max_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:async';
|
||||
import 'dart:isolate';
|
||||
import '../../../pkg/unittest/lib/unittest.dart';
|
||||
import 'event_helper.dart';
|
||||
|
||||
const int big = 1000000;
|
||||
const double inf = double.INFINITY;
|
||||
List intList = const [-0, 0, -1, 1, -10, 10, -big, big];
|
||||
List doubleList = const [-0.0, 0.0, -1.0, 1.0, -10.0, 10.0, -inf, inf];
|
||||
|
||||
main() {
|
||||
testMinMax(name, iterable, min, max, [int compare(a, b)]) {
|
||||
test("$name-min", () {
|
||||
StreamController c = new StreamController();
|
||||
Future f = c.stream.min(compare);
|
||||
f.then(expectAsync1((v) { Expect.equals(min, v);}));
|
||||
new Events.fromIterable(iterable).replay(c);
|
||||
});
|
||||
test("$name-max", () {
|
||||
StreamController c = new StreamController();
|
||||
Future f = c.stream.max(compare);
|
||||
f.then(expectAsync1((v) { Expect.equals(max, v);}));
|
||||
new Events.fromIterable(iterable).replay(c);
|
||||
});
|
||||
}
|
||||
|
||||
testMinMax("const-int", intList, -big, big);
|
||||
testMinMax("list-int", intList.toList(), -big, big);
|
||||
testMinMax("set-int", intList.toSet(), -big, big);
|
||||
|
||||
testMinMax("const-double", doubleList, -inf, inf);
|
||||
testMinMax("list-double", doubleList.toList(), -inf, inf);
|
||||
testMinMax("set-double", doubleList.toSet(), -inf, inf);
|
||||
|
||||
int reverse(a, b) => b.compareTo(a);
|
||||
testMinMax("rev-int", intList, big, -big, reverse);
|
||||
testMinMax("rev-double", doubleList, inf, -inf, reverse);
|
||||
}
|
|
@ -58,9 +58,8 @@ abstract class CssClassSet implements Set<String> {
|
|||
|
||||
int get length => readClasses().length;
|
||||
|
||||
dynamic reduce(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, String element)) {
|
||||
return readClasses().reduce(initialValue, combine);
|
||||
String reduce(String combine(String value, String element)) {
|
||||
return readClasses().reduce(combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue,
|
||||
|
@ -170,10 +169,6 @@ abstract class CssClassSet implements Set<String> {
|
|||
List<String> toList({ bool growable: true }) =>
|
||||
readClasses().toList(growable: growable);
|
||||
Set<String> toSet() => readClasses().toSet();
|
||||
String min([int compare(String a, String b)]) =>
|
||||
readClasses().min(compare);
|
||||
String max([int compare(String a, String b)]) =>
|
||||
readClasses().max(compare);
|
||||
Iterable<String> take(int n) => readClasses().take(n);
|
||||
Iterable<String> takeWhile(bool test(String value)) =>
|
||||
readClasses().takeWhile(test);
|
||||
|
|
|
@ -27,8 +27,8 @@ class _WrappedList<E> implements List<E> {
|
|||
|
||||
void forEach(void f(E element)) { _list.forEach(f); }
|
||||
|
||||
dynamic reduce(initialValue, combine(previousValue, E element)) =>
|
||||
_list.reduce(initialValue, combine);
|
||||
E reduce(E combine(E value, E element)) =>
|
||||
_list.reduce(combine);
|
||||
|
||||
dynamic fold(initialValue, combine(previousValue, E element)) =>
|
||||
_list.fold(initialValue, combine);
|
||||
|
@ -46,10 +46,6 @@ class _WrappedList<E> implements List<E> {
|
|||
|
||||
int get length => _list.length;
|
||||
|
||||
E min([int compare(E a, E b)]) => _list.min(compare);
|
||||
|
||||
E max([int compare(E a, E b)]) => _list.max(compare);
|
||||
|
||||
bool get isEmpty => _list.isEmpty;
|
||||
|
||||
Iterable<E> take(int n) => _list.take(n);
|
||||
|
|
|
@ -157,9 +157,8 @@ class _ChildrenElementList extends ListBase<Element> {
|
|||
throw new UnsupportedError('TODO(jacobr): should we impl?');
|
||||
}
|
||||
|
||||
dynamic reduce(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, Element element)) {
|
||||
return _childElements.reduce(initialValue, combine);
|
||||
Element reduce(Element combine(Element value, Element element)) {
|
||||
return _childElements.reduce(combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue,
|
||||
|
@ -272,14 +271,6 @@ class _ChildrenElementList extends ListBase<Element> {
|
|||
return first;
|
||||
}
|
||||
|
||||
Element min([int compare(Element a, Element b)]) {
|
||||
return _childElements.min(compare);
|
||||
}
|
||||
|
||||
Element max([int compare(Element a, Element b)]) {
|
||||
return _childElements.max(compare);
|
||||
}
|
||||
|
||||
Map<int, Element> asMap() {
|
||||
return _childElements.asMap();
|
||||
}
|
||||
|
|
|
@ -14,11 +14,12 @@ $if DEFINE_LENGTH_AS_NUM_ITEMS
|
|||
// SVG Collections expose numberOfItems rather than length.
|
||||
int get length => numberOfItems;
|
||||
$endif
|
||||
dynamic reduce(dynamic initialValue, dynamic combine(dynamic, $E)) {
|
||||
return IterableMixinWorkaround.reduce(this, initialValue, combine);
|
||||
$E reduce($E combine($E value, $E element)) {
|
||||
return IterableMixinWorkaround.reduce(this, combine);
|
||||
}
|
||||
|
||||
dynamic fold(dynamic initialValue, dynamic combine(dynamic, $E)) {
|
||||
dynamic fold(dynamic initialValue,
|
||||
dynamic combine(dynamic previousValue, $E element)) {
|
||||
return IterableMixinWorkaround.fold(this, initialValue, combine);
|
||||
}
|
||||
|
||||
|
@ -138,12 +139,6 @@ $endif
|
|||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
$E min([int compare($E a, $E b)]) =>
|
||||
IterableMixinWorkaround.min(this, compare);
|
||||
|
||||
$E max([int compare($E a, $E b)]) =>
|
||||
IterableMixinWorkaround.max(this, compare);
|
||||
|
||||
void insert(int index, $E element) {
|
||||
throw new UnsupportedError("Cannot add to immutable List.");
|
||||
}
|
||||
|
|
|
@ -48,12 +48,12 @@ class Package {
|
|||
where((entry) => entry.contains(_README_REGEXP));
|
||||
if (readmes.isEmpty) return;
|
||||
|
||||
return path.join(dir, readmes.min((readme1, readme2) {
|
||||
return path.join(dir, readmes.reduce((readme1, readme2) {
|
||||
var extensions1 = ".".allMatches(readme1).length;
|
||||
var extensions2 = ".".allMatches(readme2).length;
|
||||
var comparison = extensions1.compareTo(extensions2);
|
||||
if (comparison != 0) return comparison;
|
||||
return readme1.compareTo(readme2);
|
||||
if (comparison == 0) comparison = readme1.compareTo(readme2);
|
||||
return (comparison <= 0) ? readme1 : readme2;
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
library command_line_config;
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:pathos/path.dart' as path;
|
||||
import 'package:unittest/unittest.dart';
|
||||
|
@ -91,7 +92,7 @@ class CommandLineConfiguration extends Configuration {
|
|||
if (stack.length == 0) return;
|
||||
|
||||
// Figure out the longest path so we know how much to pad.
|
||||
int longest = stack.map((frame) => frame.location.length).max();
|
||||
int longest = stack.map((frame) => frame.location.length).reduce(max);
|
||||
|
||||
// Print out the stack trace nicely formatted.
|
||||
for (var frame in stack) {
|
||||
|
|
Loading…
Reference in a new issue