SCIterableBasics<E> extension

Utility extension SCmethods for the native Iterable class.

on

Methods

all(bool test(E element)) bool

Available on Iterable<E>, provided by the SCIterableBasics extension

Alias for Iterable.every.
containsAll(Iterable<E> other, {bool collapseDuplicates = true}) bool

Available on Iterable<E>, provided by the SCIterableBasics extension

Returns true if every element in other also exists in this.
containsAny(Iterable<E> other) bool

Available on Iterable<E>, provided by the SCIterableBasics extension

Returns true if this contains at least one element also contained in other.
forEachIndexed(void funcIndexValue(int index, E element)) → void

Available on Iterable<E>, provided by the SCIterableBasics extension

Applies the function funcIndexValue to each element of this collection in iteration order. The function receives the element index as first parameter index and the element as the second parameter.
none(bool test(E element)) bool

Available on Iterable<E>, provided by the SCIterableBasics extension

Returns true if no element of this satisfies test.
one(bool test(E element)) bool

Available on Iterable<E>, provided by the SCIterableBasics extension

Returns true if there is exactly one element of this which satisfies test.
sum(num addend(E)) num

Available on Iterable<E>, provided by the SCIterableBasics extension

Returns the sum of all the values in this iterable, as defined by addend.