Mixin class that implements a throwing version of all set operations that change the Set.
- Implemented types
-
- Set<
E>
- Set<
- Available extensions
- EnumByName
- FutureIterable
- HeartCollectionIterable
- HeartCollectionIterableString
- HeartCollectionSet
- HeartIterable
- HeartIterableInt
- HeartIterableIterable
- HeartIterableNum
- HeartIterableOperator
- HeartIterableString
- HeartSet
- HeartSetInt
- HeartSetIterable
- HeartSetNum
- HeartSetOperator
- HeartSetString
- IterableComparableExtension
- IterableDoubleExtension
- IterableExtension
- IterableExtensions
- IterableIntegerExtension
- IterableIterableExtension
- IterableNullableExtension
- IterableNumberExtension
- IterableToJSIterable
- NullableIterableExtensions
Constructors
Properties
-
ascending
→ Set<
E> -
Available on Set<
Returns a sorted iterable.E> , provided by the HeartSet extensionno setter -
ascending
→ Iterable<
E> -
Available on Iterable<
Returns a sorted iterable.E> , provided by the HeartIterable extensionno setter - average → double
-
Available on Iterable<
The arithmetic mean of the elements of a non-empty iterable.num> , provided by the IterableNumberExtension extensionno setter - average → double
-
Available on Iterable<
The arithmetic mean of the elements of a non-empty iterable.int> , provided by the IterableIntegerExtension extensionno setter - averageOrNull → double?
-
Available on Iterable<
Gets the average (mean) or returns null for an empty iterable.N> , provided by the HeartIterableNum extensionno setter -
backwards
→ Iterable<
E> -
Available on Iterable<
Reverses an iterable.E> , provided by the HeartIterable extensionno setter -
backwards
→ Set<
E> -
Available on Set<
Reverses a SetE> , provided by the HeartSet extensionno setter - chrs → String
-
Available on Iterable<
Returns a String from character codes.int> , provided by the HeartIterableInt extensionno setter -
descending
→ Iterable<
E> -
Available on Iterable<
Returns a sorted iterable in reverse order.E> , provided by the HeartIterable extensionno setter -
descending
→ Set<
E> -
Available on Set<
Returns a sorted iterable in reverse order.E> , provided by the HeartSet extensionno setter - first → E
-
The first element.
no setterinherited
- firstOrNull → T?
-
Available on Iterable<
The first element of this iterator, orT> , provided by the IterableExtensions extensionnullif the iterable is empty.no setter - firstOrNull → T?
-
Available on Iterable<
The first element, orT> , provided by the IterableExtension extensionnullif the iterable is empty.no setter -
flattened
→ Iterable<
T> -
Available on Iterable<
The sequential elements of each iterable in this iterable.Iterable< , provided by the IterableIterableExtension extensionT> >no setter -
flattenedToList
→ List<
T> -
Available on Iterable<
The sequential elements of each iterable in this iterable.Iterable< , provided by the IterableIterableExtension extensionT> >no setter -
flattenedToSet
→ Set<
T> -
Available on Iterable<
The unique sequential elements of each iterable in this iterable.Iterable< , provided by the IterableIterableExtension extensionT> >no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- head → E?
-
Available on Iterable<
Returns the first element. Similar to .first, but returns null if there are no elements instead of throwing exception.E> , provided by the HeartIterable extensionno setter -
indexed
→ Iterable<
(int, T)> -
Available on Iterable<
Pairs of elements of the indices and elements of this iterable.T> , provided by the IterableExtensions extensionno setter -
inits
→ Iterable<
Iterable< E> > -
Available on Iterable<
Returns a nested iterable by adding one element at a time, starting from the beginning.E> , provided by the HeartIterable extensionno setter -
inits
→ Set<
Set< E> > -
Available on Set<
Returns a nested iterable by adding one element at a time, starting from the beginning.E> , provided by the HeartSet extensionno setter - isEmpty → bool
-
Whether this collection has no elements.
no setterinherited
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setterinherited
-
iterator
→ Iterator<
E> -
An iterator that iterates over the elements of this set.
no setterinherited
- last → E
-
The last element.
no setterinherited
- lastOrNull → T?
-
Available on Iterable<
The last element, orT> , provided by the IterableExtension extensionnullif the iterable is empty.no setter - lastOrNull → T?
-
Available on Iterable<
The last element of this iterable, orT> , provided by the IterableExtensions extensionnullif the iterable is empty.no setter - length → int
-
The number of elements in this Iterable.
no setterinherited
- max → num
-
Available on Iterable<
A maximal element of the iterable.num> , provided by the IterableNumberExtension extensionno setter - max → int
-
Available on Iterable<
A maximal element of the iterable.int> , provided by the IterableIntegerExtension extensionno setter - max → T
-
Available on Iterable<
A maximal element of the iterable.T> , provided by the IterableComparableExtension extensionno setter - max → double
-
Available on Iterable<
A maximal element of the iterable.double> , provided by the IterableDoubleExtension extensionno setter - maxOrNull → int?
-
Available on Iterable<
A maximal element of the iterable, orint> , provided by the IterableIntegerExtension extensionnullif the iterable is empty.no setter - maxOrNull → T?
-
Available on Iterable<
A maximal element of the iterable, orT> , provided by the IterableComparableExtension extensionnullif the iterable is empty.no setter - maxOrNull → num?
-
Available on Iterable<
A maximal element of the iterable, ornum> , provided by the IterableNumberExtension extensionnullif the iterable is empty.no setter - maxOrNull → double?
-
Available on Iterable<
A maximal element of the iterable, ordouble> , provided by the IterableDoubleExtension extensionnullif the iterable is empty.no setter - medianOrNull → double?
-
Available on Iterable<
Returns the median of an iterable. Returns null if empty.N> , provided by the HeartIterableNum extensionno setter - min → int
-
Available on Iterable<
A minimal element of the iterable.int> , provided by the IterableIntegerExtension extensionno setter - min → num
-
Available on Iterable<
A minimal element of the iterable.num> , provided by the IterableNumberExtension extensionno setter - min → double
-
Available on Iterable<
A minimal element of the iterable.double> , provided by the IterableDoubleExtension extensionno setter - min → T
-
Available on Iterable<
A minimal element of the iterable.T> , provided by the IterableComparableExtension extensionno setter - minOrNull → double?
-
Available on Iterable<
A minimal element of the iterable, ordouble> , provided by the IterableDoubleExtension extensionnullit the iterable is empty.no setter - minOrNull → T?
-
Available on Iterable<
A minimal element of the iterable, orT> , provided by the IterableComparableExtension extensionnullit the iterable is empty.no setter - minOrNull → int?
-
Available on Iterable<
A minimal element of the iterable, orint> , provided by the IterableIntegerExtension extensionnullit the iterable is empty.no setter - minOrNull → num?
-
Available on Iterable<
A minimal element of the iterable, ornum> , provided by the IterableNumberExtension extensionnullit the iterable is empty.no setter -
nonNulls
→ Iterable<
T> -
Available on Iterable<
The non-T?> , provided by the NullableIterableExtensions extensionnullelements of this iterable.no setter - productOrNull → N?
-
Available on Iterable<
Multiplies all numbers of an iterable. Returns null if empty.N> , provided by the HeartIterableNum extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- single → E
-
Checks that this iterable has only one element, and returns that element.
no setterinherited
- singleOrNull → T?
-
Available on Iterable<
The single element of this iterator, orT> , provided by the IterableExtensions extensionnull.no setter - singleOrNull → T?
-
Available on Iterable<
The single element of the iterable, orT> , provided by the IterableExtension extensionnull.no setter - sum → double
-
Available on Iterable<
The sum of the elements.double> , provided by the IterableDoubleExtension extensionno setter - sum → int
-
Available on Iterable<
The sum of the elements.int> , provided by the IterableIntegerExtension extensionno setter - sum → num
-
Available on Iterable<
The sum of the elements.num> , provided by the IterableNumberExtension extensionno setter - sumOrNull → N?
-
Available on Iterable<
Sum of all numbers.N> , provided by the HeartIterableNum extensionno setter - sumOrNull → int?
-
Available on Iterable<
Sum of all numbers.int> , provided by the HeartIterableInt extensionno setter -
tail
→ Set<
E> ? -
Available on Set<
Removes the first element, keeps the "tail".E> , provided by the HeartSet extensionno setter -
tail
→ Iterable<
E> ? -
Available on Iterable<
Removes the first element, keeps the "tail".E> , provided by the HeartIterable extensionno setter -
tails
→ Set<
Set< E> > -
Available on Set<
Returns a nested iterable by removing one element at a time, starting from the beginning.E> , provided by the HeartSet extensionno setter -
tails
→ Iterable<
Iterable< E> > -
Available on Iterable<
Returns a nested iterable by removing one element at a time, starting from the beginning.E> , provided by the HeartIterable extensionno setter -
toJSIterable
→ JSIterable<
T> -
Available on Iterable<
A JSIterable wrapper that proxies to the Dart iterable API.T> , provided by the IterableToJSIterable extensionno setter -
wait
→ Future<
List< T> > -
Available on Iterable<
Waits for futures in parallel.Future< , provided by the FutureIterable extensionT> >no setter
Methods
-
add(
E value) → bool -
Throws an UnsupportedError;
operations that change the set are disallowed.
override
-
addAll(
Iterable< E> elements) → void -
Throws an UnsupportedError;
operations that change the set are disallowed.
override
-
addMissing(
Iterable< E> elements, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable<E> -
Available on Iterable<
Adds elements fromE> , provided by the HeartIterable extensionelementsthat are not in original value. -
addMissing(
Iterable< E> elements, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set<E> -
Available on Set<
Adds elements fromE> , provided by the HeartSet extensionelementsthat are not in original value. -
after(
Iterable< E> sub, {int skip = 0, bool overlap = false, bool includeInResult = false, bool reverse = false, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable<E> -
Available on Iterable<
Returns everything afterE> , provided by the HeartIterable extensionsub.1, 2, 3.after(1) returns (2, 3).1, 2, 3.after(1, 2) returns (3).1, 2, 3.after([]) returns (1, 2, 3). -
after(
Iterable< E> sub, {int skip = 0, bool overlap = false, bool includeInResult = false, bool reverse = false, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set<E> -
Available on Set<
Returns everything afterE> , provided by the HeartSet extensionsub.1, 2, 3.after(1) returns2, 3.1, 2, 3.after(1, 2) returns3.1, 2, 3.after([]) returns1, 2, 3. -
afterWhere(
bool test(E e), {int skip = 0, bool includeInResult = false, bool reverse = false}) → Set< E> -
Available on Set<
Return everything after a condition is met.E> , provided by the HeartSet extension1, 2, 3, 4.afterWhere((e) => e.isOdd) returns2, 3, 4. -
afterWhere(
bool test(E e), {int skip = 0, bool includeInResult = false, bool reverse = false}) → Iterable< E> -
Available on Iterable<
Return everything after a condition is met.E> , provided by the HeartIterable extension1, 2, 3, 4.afterWhere((e) => e.isOdd) returns (2, 3, 4). -
any(
bool test(E value)) → bool -
Checks whether any element of this iterable satisfies
test.inherited -
asNameMap(
) → Map< String, T> -
Available on Iterable<
Creates a map from the names of enum values to the values.T> , provided by the EnumByName extension -
before(
Iterable< E> sub, {int skip = 0, bool overlap = false, bool includeInResult = false, bool reverse = false, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set<E> -
Available on Set<
Returns everything before a given input:E> , provided by the HeartSet extension1, 2, 3, 3.before(3, 3) returns1, 2.1, 2, 3, 3.before(1) returns [].1, 2, 3, 3.before([]) returns []. -
before(
Iterable< E> sub, {int skip = 0, bool overlap = false, bool includeInResult = false, bool reverse = false, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable<E> -
Available on Iterable<
Returns everything before a given input:E> , provided by the HeartIterable extension1, 2, 3, 3.before(3, 3) returns (1, 2).1, 2, 3, 3.before(1) returns ().1, 2, 3, 3.before([]) returns (). -
beforeWhere(
bool test(E e), {int skip = 0, bool includeInResult = false, bool reverse = false}) → Set< E> -
Available on Set<
Return everything before a condition is met.E> , provided by the HeartSet extension1, 2, 3.beforeWhere((e) => e == 3) returns1, 2. -
beforeWhere(
bool test(E e), {int skip = 0, bool includeInResult = false, bool reverse = false}) → Iterable< E> -
Available on Iterable<
Return everything before a condition is met.E> , provided by the HeartIterable extension1, 2, 3.beforeWhere((e) => e == 3) returns (1, 2). -
byName(
String name) → T -
Available on Iterable<
Finds the enum value in this list with nameT> , provided by the EnumByName extensionname. -
cast<
R> () → Set< T> -
Provides a view of this set as a set of
Rinstances.inherited -
clear(
) → void -
Throws an UnsupportedError;
operations that change the set are disallowed.
override
-
concat(
) → String -
Available on Iterable<
Concatenate Strings together.String> , provided by the HeartIterableString extension -
concat(
) → Set< E> -
Available on Set<
Concatenate elements in nested iterable.Iterable< , provided by the HeartSetIterable extensionE> > -
concat(
) → Iterable< E> -
Available on Iterable<
Concatenate elements in nested iterable.Iterable< , provided by the HeartIterableIterable extensionE> > -
contains(
Object? value) → bool -
Whether
valueis in the set.inherited -
containsAll(
Iterable< Object?> other) → bool -
Whether this set contains all the elements of
other.inherited -
count(
Iterable< E> sub, {bool overlap = false, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → int -
Available on Iterable<
Count occurrences of elements occurring together, with option to includeE> , provided by the HeartIterable extensionoverlap. -
dec(
[N? decrementAmount]) → Iterable< N> -
Available on Iterable<
Decrement all values byN> , provided by the HeartIterableNum extensiondecrementAmount. -
dec(
[N? decrementAmount]) → Set< N> -
Available on Set<
Decrement all values byN> , provided by the HeartSetNum extensiondecrementAmount. -
deepContains(
Iterable< E> sub, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → bool -
Available on Iterable<
Returns true if iterable containsE> , provided by the HeartIterable extensionsub. -
difference(
Set< Object?> other) → Set<E> -
Creates a new set with the elements of this that are not in
other.inherited -
div(
N divideBy) → Iterable< N> -
Available on Iterable<
Divide all values byN> , provided by the HeartIterableNum extensiondivideBy. -
div(
N divideBy) → Set< N> -
Available on Set<
Divide all values byN> , provided by the HeartSetNum extensiondivideBy. -
div(
int divideBy) → Set< int> -
Available on Set<
Divide all values byint> , provided by the HeartSetInt extensiondivideBy. -
div(
int divideBy) → Iterable< int> -
Available on Iterable<
Divide all values byint> , provided by the HeartIterableInt extensiondivideBy. -
dropIndices(
Iterable< int> indicesToDrop) → Set<E> - Removes the elements at the given indices.
-
dropIndices(
Iterable< int> indicesToDrop) → Iterable<E> -
Available on Iterable<
Removes the elements at the given indices.E> , provided by the HeartIterable extension -
elementAt(
int index) → E -
Returns the
indexth element.inherited -
elementAtOrNull(
int index) → T? -
Available on Iterable<
The element at positionT> , provided by the IterableExtensions extensionindexof this iterable, ornull. -
elementAtOrNull(
int index) → T? -
Available on Iterable<
TheT> , provided by the IterableExtension extensionindexth element, ornullif there is no such element. -
every(
bool test(E value)) → bool -
Checks whether every element of this iterable satisfies
test.inherited -
expand<
T> (Iterable< T> toElements(E element)) → Iterable<T> -
Expands each element of this Iterable into zero or more elements.
inherited
-
expandIndexed<
R> (Iterable< R> expand(int index, T element)) → Iterable<R> -
Available on Iterable<
Expands each element and index to a number of elements in a new iterable.T> , provided by the IterableExtension extension -
filter(
bool test(E element)) → Set< E> -
Available on Set<
.where equivalentE> , provided by the HeartCollectionSet extension -
filter(
bool test(E element)) → Iterable< E> -
Available on Iterable<
.where equivalentE> , provided by the HeartCollectionIterable extension -
filterIndexed(
bool test(int index, E element)) → Set< E> -
Available on Set<
.whereIndexed equivalentE> , provided by the HeartCollectionSet extension -
filterIndexed(
bool test(int index, E element)) → Iterable< E> -
Available on Iterable<
.whereIndexed equivalentE> , provided by the HeartCollectionIterable extension -
filterNot(
bool test(E element)) → Set< E> -
Available on Set<
.whereNot equivalentE> , provided by the HeartCollectionSet extension -
filterNot(
bool test(E element)) → Iterable< E> -
Available on Iterable<
.whereNot equivalentE> , provided by the HeartCollectionIterable extension -
filterNotIndexed(
bool test(int index, E element)) → Iterable< E> -
Available on Iterable<
.whereNotIndexed equivalentE> , provided by the HeartCollectionIterable extension -
filterNotIndexed(
bool test(int index, E element)) → Set< E> -
Available on Set<
.whereNotIndexed equivalentE> , provided by the HeartCollectionSet extension -
filterType<
T> () → Iterable< T> -
Available on Iterable<
.whereType equivalent.E> , provided by the HeartCollectionIterable extension -
filterType<
T> () → Set< T> -
Available on Set<
.whereType equivalent.E> , provided by the HeartCollectionSet extension -
firstWhere(
bool test(E value), {E orElse()?}) → E -
The first element that satisfies the given predicate
test.inherited -
firstWhereIndexedOrNull(
bool test(int index, T element)) → T? -
Available on Iterable<
The first element whose value and index satisfiesT> , provided by the IterableExtension extensiontest. -
firstWhereOrNull(
bool test(T element)) → T? -
Available on Iterable<
The first element satisfyingT> , provided by the IterableExtension extensiontest, ornullif there are none. -
flatMap<
T> (List< T> toElements(E element)) → Set<T> -
Available on Set<
.expand equivalentE> , provided by the HeartCollectionSet extension -
flatMap<
T> (Iterable< T> toElements(E element)) → Iterable<T> -
Available on Iterable<
.expand equivalentE> , provided by the HeartCollectionIterable extension -
flatMapIndexed<
R> (Iterable< R> expand(int index, E element)) → Set<R> -
Available on Set<
.expandIndexed equivalentE> , provided by the HeartCollectionSet extension -
flatMapIndexed<
R> (Iterable< R> expand(int index, E element)) → Iterable<R> -
Available on Iterable<
.expandIndexed equivalentE> , provided by the HeartCollectionIterable extension -
flatMapString(
Iterable< String> toElements(String)) → String -
Available on Iterable<
.expand equivalentString> , provided by the HeartCollectionIterableString extension -
flatMapStringIndexed(
Iterable< String> expand(int index, String element)) → String -
Available on Iterable<
.expandIndexed equivalentString> , provided by the HeartCollectionIterableString extension -
fold<
T> (T initialValue, T combine(T previousValue, E element)) → T -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
inherited
-
foldIndexed<
R> (R initialValue, R combine(int index, R previous, T element)) → R -
Available on Iterable<
Combine the elements with a value and the current index.T> , provided by the IterableExtension extension -
followedBy(
Iterable< E> other) → Iterable<E> -
Creates the lazy concatenation of this iterable and
other.inherited -
forEach(
void action(E element)) → void -
Invokes
actionon each element of this iterable in iteration order.inherited -
forEachIndexed(
void action(int index, T element)) → void -
Available on Iterable<
Takes an action for each element.T> , provided by the IterableExtension extension -
forEachIndexedWhile(
bool action(int index, T element)) → void -
Available on Iterable<
Takes an action for each element and index as long as desired.T> , provided by the IterableExtension extension -
forEachWhile(
bool action(T element)) → void -
Available on Iterable<
Takes an action for each element as long as desired.T> , provided by the IterableExtension extension -
frequencies(
{bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Map< E, int> -
Available on Iterable<
Return a Map that shows the frequencies of each element:E> , provided by the HeartIterable extension -
group(
{bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable< Iterable< E> > -
Available on Iterable<
Items are grouped together if they are equal to the one next to it.E> , provided by the HeartIterable extension -
group(
{bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set< Set< E> > - Items are grouped together if they are equal to the one next to it.
-
groupBy(
bool groupFunction(dynamic a, dynamic b)) → Iterable< Iterable< E> > -
Available on Iterable<
Items are grouped together if they meet the criteria that compares consecutive elements.E> , provided by the HeartIterable extension -
groupBy(
bool groupFunction(dynamic a, dynamic b)) → Set< Set< E> > - Items are grouped together if they meet the criteria that compares consecutive elements.
-
groupFoldBy<
K, G> (K keyOf(T element), G combine(G? previous, T element)) → Map< K, G> -
Available on Iterable<
Groups elements byT> , provided by the IterableExtension extensionkeyOfthen folds the elements in each group. -
groupListsBy<
K> (K keyOf(T element)) → Map< K, List< T> > -
Available on Iterable<
Groups elements into lists byT> , provided by the IterableExtension extensionkeyOf. -
groupSetsBy<
K> (K keyOf(T element)) → Map< K, Set< T> > -
Available on Iterable<
Groups elements into sets byT> , provided by the IterableExtension extensionkeyOf. -
inc(
[N? incrementAmount]) → Iterable< N> -
Available on Iterable<
Increment all values byN> , provided by the HeartIterableNum extensionincrementAmount. -
inc(
[N? incrementAmount]) → Set< N> -
Available on Set<
Increment all values byN> , provided by the HeartSetNum extensionincrementAmount. -
indicesOf(
Iterable< E> sub, {bool overlap = false, bool reverse = false, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → List<int> -
Available on Iterable<
Finds every index where a sequence of elements occurs in an iterable, with option to includeE> , provided by the HeartIterable extensionoverlap. -
indicesWhere(
bool testFunction(E e)) → List< int> -
Available on Iterable<
Find all indices where a given condition is true.E> , provided by the HeartIterable extension -
insertInOrder(
Iterable< int> numbersToInsert) → Set<int> -
Available on Set<
Inserts each element inint> , provided by the HeartSetInt extensionnumbersToInsertbefore the first element that is >= -
insertInOrder(
Iterable< N> numbersToInsert) → Iterable<N> -
Available on Iterable<
Inserts each element inN> , provided by the HeartIterableNum extensionnumbersToInsertbefore the first element that is >= -
insertInOrder(
Iterable< int> numbersToInsert) → Iterable<int> -
Available on Iterable<
Inserts each element inint> , provided by the HeartIterableInt extensionnumbersToInsertbefore the first element that is >= -
insertInOrder(
Iterable< N> numbersToInsert) → Set<N> -
Available on Set<
Inserts each element inN> , provided by the HeartSetNum extensionnumbersToInsertbefore the first element that is >= -
intercalate(
Iterable< E> input, {int? count, int skip = 0, bool reverse = false}) → Iterable<E> -
Available on Iterable<
Inserts an iterable in between iterables and concatenates the result.Iterable< , provided by the HeartIterableIterable extensionE> > -
intercalate(
Iterable< E> input, {int? count, int skip = 0, bool reverse = false}) → Set<E> -
Available on Set<
Inserts an iterable in between iterables and concatenates the result.Iterable< , provided by the HeartSetIterable extensionE> > -
intercalate(
String input, {int? count, int skip = 0, bool reverse = false}) → String -
Available on Iterable<
Inserts a String between Strings and concatenates the result.String> , provided by the HeartIterableString extension -
interleave(
Iterable< E> it) → Iterable<E> -
Available on Iterable<
Combines elements by taking turns. First element in original iterable is the first element of the result.E> , provided by the HeartIterable extension -
interleave(
Iterable< E> it) → Set<E> - Combines elements by taking turns. First element in original iterable is the first element of the result.
-
intersection(
Set< Object?> other) → Set<E> -
Creates a new set which is the intersection between this set and
other.inherited -
intersperse(
Iterable< E> elementsToAdd, {int? count, int skip = 0, bool reverse = false}) → Set<E> - Inserts an element in between each element.
-
intersperse(
Iterable< E> elementsToAdd, {int? count, int skip = 0, bool reverse = false}) → Iterable<E> -
Available on Iterable<
Inserts an element in between each element.E> , provided by the HeartIterable extension -
isSorted(
[Comparator< T> ? compare]) → bool -
Available on Iterable<
Whether the elements are sorted by theT> , provided by the IterableComparableExtension extensioncompareordering. -
isSorted(
Comparator< T> compare) → bool -
Available on Iterable<
Whether the elements are sorted by theT> , provided by the IterableExtension extensioncompareordering. -
isSortedBy<
K extends Comparable< (K> >K keyOf(T element)) → bool -
Available on Iterable<
Whether the elements are sorted by theirT> , provided by the IterableExtension extensionkeyOfproperty. -
isSortedByCompare<
K> (K keyOf(T element), Comparator< K> compare) → bool -
Available on Iterable<
Whether the elements areT> , provided by the IterableExtension extensioncompare-sorted by theirkeyOfproperty. -
join(
[String separator = ""]) → String -
Converts each element to a String and concatenates the strings.
inherited
-
keep(
Iterable< E> elementsToKeep, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set<E> -
Available on Set<
Keeps all elements that are also inE> , provided by the HeartSet extensionelementsToKeep. -
keep(
Iterable< E> elementsToKeep, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable<E> -
Available on Iterable<
Keeps all elements that are also inE> , provided by the HeartIterable extensionelementsToKeep. -
keepIndices(
Iterable< int> indices) → Set<E> - Returns elements at the given indices.
-
keepIndices(
Iterable< int> indices) → Iterable<E> -
Available on Iterable<
Returns elements at the given indices.E> , provided by the HeartIterable extension -
lastBy<
K> (K key(T)) → Map< K, T> -
Available on Iterable<
Associates the elements inT> , provided by the IterableExtension extensionthisby the value returned bykey. -
lastWhere(
bool test(E value), {E orElse()?}) → E -
The last element that satisfies the given predicate
test.inherited -
lastWhereIndexedOrNull(
bool test(int index, T element)) → T? -
Available on Iterable<
The last element whose index and value satisfiesT> , provided by the IterableExtension extensiontest. -
lastWhereOrNull(
bool test(T element)) → T? -
Available on Iterable<
The last element satisfyingT> , provided by the IterableExtension extensiontest, ornullif there are none. -
lookup(
Object? object) → E? -
If an object equal to
objectis in the set, return it.inherited -
map<
T> (T toElement(E e)) → Iterable< T> -
The current elements of this iterable modified by
toElement.inherited -
mapIndexed<
R> (R convert(int index, T element)) → Iterable< R> -
Available on Iterable<
Maps each element and its index to a new value.T> , provided by the IterableExtension extension -
mode(
{bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable< E> -
Available on Iterable<
Returns the element(s) with the most occurrences.E> , provided by the HeartIterable extension -
mode(
{bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set< E> - Returns the element(s) with the most occurrences.
-
mult(
N multiplyBy) → Iterable< N> -
Available on Iterable<
Multiply all values byN> , provided by the HeartIterableNum extensionmultiplyBy -
mult(
N multiplyBy) → Set< N> -
Available on Set<
Multiply all values byN> , provided by the HeartSetNum extensionmultiplyBy -
none(
bool test(T element)) → bool -
Available on Iterable<
Whether no element satisfiesT> , provided by the IterableExtension extensiontest. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nub(
{Iterable< E> ? elementsToNub, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set<E> - Removes duplicates.
-
nub(
{Iterable< E> ? elementsToNub, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable<E> -
Available on Iterable<
Removes duplicates.E> , provided by the HeartIterable extension -
reduce(
E combine(E value, E element)) → E -
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
inherited
-
reduceIndexed(
T combine(int index, T previous, T element)) → T -
Available on Iterable<
Combine the elements with each other and the current index.T> , provided by the IterableExtension extension -
remove(
Object? value) → bool -
Throws an UnsupportedError;
operations that change the set are disallowed.
override
-
removeAll(
Iterable elements) → void -
Throws an UnsupportedError;
operations that change the set are disallowed.
override
-
removeWhere(
bool test(E value)) → void -
Throws an UnsupportedError;
operations that change the set are disallowed.
override
-
replace(
Iterable< E> from, Iterable<E> to, {int? count, int skip = 0, bool reverse = false, dynamic recursive = false, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set<E> -
Available on Set<
ReplaceE> , provided by the HeartSet extensionfromwithto. -
replace(
Iterable< E> from, Iterable<E> to, {int? count, int skip = 0, bool reverse = false, dynamic recursive = false, bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable<E> -
Available on Iterable<
ReplaceE> , provided by the HeartIterable extensionfromwithto. -
retainAll(
Iterable elements) → void -
Throws an UnsupportedError;
operations that change the set are disallowed.
override
-
retainWhere(
bool test(E value)) → void -
Throws an UnsupportedError;
operations that change the set are disallowed.
override
-
riffleIn(
{bool inverse = false}) → Set< E> -
Available on Set<
Splits into two and uses interleave to combine, second half first.E> , provided by the HeartSet extension -
riffleIn(
{bool inverse = false}) → Iterable< E> -
Available on Iterable<
Splits into two and uses interleave to combine, second half first.E> , provided by the HeartIterable extension -
riffleOut(
{bool inverse = false}) → Iterable< E> -
Available on Iterable<
Splits into two and uses interleave to combine.E> , provided by the HeartIterable extension -
riffleOut(
{bool inverse = false}) → Set< E> -
Available on Set<
Splits into two and uses interleave to combine.E> , provided by the HeartSet extension -
sample(
int count, [Random? random]) → List< T> -
Available on Iterable<
SelectsT> , provided by the IterableExtension extensioncountelements at random from this iterable. -
shuffled(
[Random? random]) → List< T> -
Available on Iterable<
Creates a shuffled list of the elements of the iterable.T> , provided by the IterableExtension extension -
singleWhere(
bool test(E value), {E orElse()?}) → E -
The single element that satisfies
test.inherited -
singleWhereIndexedOrNull(
bool test(int index, T element)) → T? -
Available on Iterable<
The single element satisfyingT> , provided by the IterableExtension extensiontest. -
singleWhereOrNull(
bool test(T element)) → T? -
Available on Iterable<
The single element satisfyingT> , provided by the IterableExtension extensiontest. -
skip(
int count) → Iterable< E> -
Creates an Iterable that provides all but the first
countelements.inherited -
skipWhile(
bool test(E value)) → Iterable< E> -
Creates an
Iterablethat skips leading elements whiletestis satisfied.inherited -
slices(
int length) → Iterable< List< T> > -
Available on Iterable<
Contiguous slices ofT> , provided by the IterableExtension extensionthiswith the givenlength. -
sorted(
[Comparator< T> ? compare]) → List<T> -
Available on Iterable<
Creates a sorted list of the elements of the iterable.T> , provided by the IterableComparableExtension extension -
sorted(
Comparator< T> compare) → List<T> -
Available on Iterable<
Creates a sorted list of the elements of the iterable.T> , provided by the IterableExtension extension -
sortedBy<
K extends Comparable< (K> >K keyOf(T element)) → List< T> -
Available on Iterable<
Creates a sorted list of the elements of the iterable.T> , provided by the IterableExtension extension -
sortedByCompare<
K> (K keyOf(T element), Comparator< K> compare) → List<T> -
Available on Iterable<
Creates a sorted list of the elements of the iterable.T> , provided by the IterableExtension extension -
splitAfter(
bool test(T element)) → Iterable< List< T> > -
Available on Iterable<
Splits the elements into chunks after some elements.T> , provided by the IterableExtension extension -
splitAfterIndexed(
bool test(int index, T element)) → Iterable< List< T> > -
Available on Iterable<
Splits the elements into chunks after some elements and indices.T> , provided by the IterableExtension extension -
splitAt(
int n) → Iterable< Iterable< E> > -
Available on Iterable<
Splits into two after firstE> , provided by the HeartIterable extensionnelements. -
splitAt(
int n) → Set< Set< E> > -
Available on Set<
Splits into two after firstE> , provided by the HeartSet extensionnelements. -
splitBefore(
bool test(T element)) → Iterable< List< T> > -
Available on Iterable<
Splits the elements into chunks before some elements.T> , provided by the IterableExtension extension -
splitBeforeIndexed(
bool test(int index, T element)) → Iterable< List< T> > -
Available on Iterable<
Splits the elements into chunks before some elements and indices.T> , provided by the IterableExtension extension -
splitBetween(
bool test(T first, T second)) → Iterable< List< T> > -
Available on Iterable<
Splits the elements into chunks between some elements.T> , provided by the IterableExtension extension -
splitBetweenIndexed(
bool test(int index, T first, T second)) → Iterable< List< T> > -
Available on Iterable<
Splits the elements into chunks between some elements and indices.T> , provided by the IterableExtension extension -
startsWith(
Iterable< E> sub, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → bool -
Available on Iterable<
Equivalent to Dart's .startsWith for String:E> , provided by the HeartIterable extension -
subtract(
Iterable< E> elementsToSubtract, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable<E> -
Available on Iterable<
Removes elements one at a time if they are present.E> , provided by the HeartIterable extension -
subtract(
Iterable< E> elementsToSubtract, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set<E> - Removes elements one at a time if they are present.
-
subtractAll(
Iterable< E> elementsToRemove, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Iterable<E> -
Available on Iterable<
Removes all elements if they are inE> , provided by the HeartIterable extensionelementsToRemove. -
subtractAll(
Iterable< E> elementsToRemove, {bool equalityFunction(E a, E b) = h.symmetricDeepEquals}) → Set<E> -
Available on Set<
Removes all elements if they are inE> , provided by the HeartSet extensionelementsToRemove. -
take(
int count) → Iterable< E> -
Creates a lazy iterable of the
countfirst elements of this iterable.inherited -
takeWhile(
bool test(E value)) → Iterable< E> -
Creates a lazy iterable of the leading elements satisfying
test.inherited -
toDoubles(
) → Set< double> -
Available on Set<
Convert elements to doubles.N> , provided by the HeartSetNum extension -
toDoubles(
) → Iterable< double> -
Available on Iterable<
Convert elements to doubles.N> , provided by the HeartIterableNum extension -
toInts(
) → Set< int> -
Available on Set<
Convert elements to truncated integers.N> , provided by the HeartSetNum extension -
toInts(
) → Iterable< int> -
Available on Iterable<
Convert elements to truncated integers.N> , provided by the HeartIterableNum extension -
toList(
{bool growable = true}) → List< E> -
Creates a List containing the elements of this Iterable.
inherited
-
toRounded(
) → Set< int> -
Available on Set<
Convert elements to rounded integers.N> , provided by the HeartSetNum extension -
toRounded(
) → Iterable< int> -
Available on Iterable<
Convert elements to rounded integers.N> , provided by the HeartIterableNum extension -
toSet(
) → Set< E> -
Creates a Set with the same elements and behavior as this
Set.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
toStrings(
) → Iterable< String> -
Available on Iterable<
Converts all elements to Strings.E> , provided by the HeartIterable extension -
toStrings(
) → Set< String> - Converts all elements to Strings.
-
transform<
T> (T toElement(E e)) → Set< T> -
Available on Set<
.map equivalentE> , provided by the HeartCollectionSet extension -
transform<
T> (T toElement(E e)) → Iterable< T> -
Available on Iterable<
.map equivalentE> , provided by the HeartCollectionIterable extension -
transformIndexed<
R> (R convert(int index, E element)) → Set< R> -
Available on Set<
.mapIndexed equivalentE> , provided by the HeartCollectionSet extension -
transformIndexed<
R> (R convert(int index, E element)) → Iterable< R> -
Available on Iterable<
.mapIndexed equivalentE> , provided by the HeartCollectionIterable extension -
union(
Set< E> other) → Set<E> -
Creates a new set which contains all the elements of this set and
other.inherited -
where(
bool test(E value)) → Iterable< E> -
Creates a new lazy Iterable with all elements that satisfy the
predicate
test.inherited -
whereIndexed(
bool test(int index, T element)) → Iterable< T> -
Available on Iterable<
The elements whose value and index satisfiesT> , provided by the IterableExtension extensiontest. -
whereNot(
bool test(T element)) → Iterable< T> -
Available on Iterable<
The elements that do not satisfyT> , provided by the IterableExtension extensiontest. -
whereNotIndexed(
bool test(int index, T element)) → Iterable< T> -
Available on Iterable<
The elements whose value and index do not satisfyT> , provided by the IterableExtension extensiontest. -
whereNotNull(
) → Iterable< T> -
Available on Iterable<
The non-T?> , provided by the IterableNullableExtension extensionnullelements of thisIterable. -
whereType<
T> () → Iterable< T> -
Creates a new lazy Iterable with all elements that have type
T.inherited -
zip(
) → Set< String> -
Available on Set<
Pairs corresponding elements together.String> , provided by the HeartSetString extension -
zip(
) → Set< Set< E> > -
Available on Set<
Pairs corresponding elements together.Iterable< , provided by the HeartSetIterable extensionE> > -
zip(
) → Iterable< String> -
Available on Iterable<
Pairs corresponding elements together.String> , provided by the HeartIterableString extension -
zip(
) → Iterable< Iterable< E> > -
Available on Iterable<
Pairs corresponding elements together.Iterable< , provided by the HeartIterableIterable extensionE> > -
zipWith<
R> (R zipFunction(List< String> )) → Set<R> -
Available on Set<
Perform a function between corresponding characters.String> , provided by the HeartSetString extension -
zipWith<
R> (R zipFunction(List< E> )) → Set<R> -
Available on Set<
Returns an iterable by performing a function between corresponding elements of a nested iterable.Iterable< , provided by the HeartSetIterable extensionE> > -
zipWith<
R> (R zipFunction(List< String> )) → Iterable<R> -
Available on Iterable<
Perform a function between corresponding characters.String> , provided by the HeartIterableString extension -
zipWith<
R> (R zipFunction(List< E> )) → Iterable<R> -
Available on Iterable<
Returns an iterable by performing a function between corresponding elements of a nested iterable.Iterable< , provided by the HeartIterableIterable extensionE> >
Operators
-
operator *(
int n) → Iterable< E> -
Available on Iterable<
Repeat n times. Dart already does this for Strings.E> , provided by the HeartIterableOperator extension1, 2* 3 returns (1, 2, 1, 2, 1, 2). -
operator *(
int n) → Set< E> -
Available on Set<
Repeat n times. Dart already does this for Strings.E> , provided by the HeartSetOperator extension1, 2* 3 returns1, 2, 1, 2, 1, 2 -
operator <(
Iterable it) → bool -
Available on Iterable<
Compare iterables element by element.E> , provided by the HeartIterableOperator extension1, 1, 3<1, 2, 3returns true because the second elements: 1 < 2.1, 'a'<1, 'b'returns true.1, 2<1, 2, 3returns true because first two elements are the same but the first iterable has shorter length. -
operator <=(
Iterable it) → bool -
Available on Iterable<
Returns true if < returns true or if equal length iterables have equal elements.E> , provided by the HeartIterableOperator extension1, 2<= {1, 2} returns true. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
Iterable it) → bool -
Available on Iterable<
Compare iterables element by element.E> , provided by the HeartIterableOperator extension -
operator >=(
Iterable it) → bool -
Available on Iterable<
Returns true if > returns true or if equal length iterables have equal elements.E> , provided by the HeartIterableOperator extension1, 2>=1, 2returns true.