ISetConst<T> class
This is an ISet which can be made constant. Note: Don't ever use it without the "const" keyword, because it will be unsafe.
The const ISet will always keep insertion order. In other words, you can't make
the sort configuration true
.
- Inheritance
-
- Object
- ImmutableCollection<
ISet< T> > - ISet<
T> - ISetConst
- Available extensions
- Annotations
-
- @immutable
Constructors
-
ISetConst.new(Set<
T> _set, [ConfigSet config = const ConfigSet()]) -
To create an empty constant ISet:
const ISetConst({})
. To create a constant set with items:const ISetConst({1, 2, 3})
.const
Properties
- anyItem → T
-
Returns any item from the set. This is useful if you need to read
some property that you know all items in the set have.
no setterinherited
-
asComparableEntries
→ Iterable<
Entry< K, V> > -
Available on Iterable<
MapEntry is not Comparable. If you need to compare two iterables of MapEntry you can do this:MapEntry< , provided by the FicIterableOfMapEntryExtension extensionK, V> >no setter -
collect
→ ZIO<
R, E, IList< A> > -
Available on Iterable<
Alias for ZIO.collectIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter -
collectDiscard
→ ZIO<
R, E, Unit> -
Available on Iterable<
Alias for ZIO.collectDiscardIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter -
collectPar
→ ZIO<
R, E, IList< A> > -
Available on Iterable<
Alias for ZIO.collectParIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter -
collectParDiscard
→ ZIO<
R, E, Unit> -
Available on Iterable<
Alias for ZIO.collectParDiscardIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter - config → ConfigSet
-
The set configuration.
final
- first → T
-
- If the set's config has ConfigSet.sort
true
, will return the first element in the natural order of items. Note: This is not a fast operation, as ISets are not naturally sorted.- If the set's config has ConfigSet.sort
false
(the default), or if the items are not Comparable, the first item by insertion will be returned.no setterinherited - If the set's config has ConfigSet.sort
-
firstOption
→ Option<
T> -
Available on Iterable<
Get the first element of the Iterable. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter - firstOrNull → T?
-
Available on Iterable<
The first element of this iterator, orT> , provided by the IterableExtensions extensionnull
if the iterable is empty.no setter - firstOrNull → T?
-
Returns the first element, or
null
if the set is empty.no setterinherited -
flatten
→ Iterable<
T> -
Available on Iterable<
From aIterable< , provided by the ElementalOnIterableOfIterable extensionT> >Iterable<Iterable<T>>
return aIterable<T>
of their concatenation.no setter -
flush
→ ISetConst<
T> -
Nothing happens when you flush a constant set, by definition.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
head
→ Option<
T> -
Available on Iterable<
Get the first element of the Iterable. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable 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 -
init
→ Option<
Iterable< T> > -
Available on Iterable<
Return all the elements of a Iterable except the last one. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter - isDeepEquals → bool
-
See also: ConfigList
no setterinherited
- isEmpty → bool
-
Returns
true
if there are no elements in this collection.no setterinherited - isFlushed → bool
-
A constant set is always flushed, by definition.
no setteroverride
- isIdentityEquals → bool
-
See also: ConfigList
no setterinherited
- isNotEmpty → bool
-
Returns
true
if there is at least one element in this collection.no setterinherited -
iterator
→ Iterator<
T> -
- If the set's config has ConfigSet.sort
true
, it will iterate in the natural order of items. In other words, if the items are Comparable, they will be sorted bya.compareTo(b)
.- If the set's config has ConfigSet.sort
false
(the default), or if the items are not Comparable, the iterator order is the insertion order.no setterinherited - If the set's config has ConfigSet.sort
- last → T
-
- If the set's config has ConfigSet.sort
true
, will return the last element in the natural order of items. Note: This is not a fast operation, as ISets are not naturally sorted.- If the set's config has ConfigSet.sort
false
(the default), or if the items are not Comparable, the last item by insertion will be returned.no setterinherited - If the set's config has ConfigSet.sort
-
lastOption
→ Option<
T> -
Available on Iterable<
Get the last element of the Iterable. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter - lastOrNull → T?
-
Returns the last element, or
null
if the set is empty.no setterinherited - lastOrNull → T?
-
Available on Iterable<
The last element of this iterable, orT> , provided by the IterableExtensions extensionnull
if the iterable is empty.no setter - length → int
-
The number of objects in this set.
no setterinherited
-
nonNulls
→ Iterable<
T> -
Available on Iterable<
The non-T?> , provided by the NullableIterableExtensions extensionnull
elements of this iterable.no setter -
raceAll
→ ZIO<
R, E, A> -
Available on Iterable<
Alias for ZIO.raceAllIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- single → T
-
Checks that this iterable has only one element, and returns that element.
Throws a StateError if the set is empty or has more than one element.
no setterinherited
- singleOrNull → T?
-
Checks that the set has only one element, and returns that element.
Return
null
if the set is empty or has more than one element.no setterinherited - singleOrNull → T?
-
Available on Iterable<
The single element of this iterator, orT> , provided by the IterableExtensions extensionnull
.no setter -
tail
→ Option<
Iterable< T> > -
Available on Iterable<
Return all the elements of a Iterable except the first one. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter -
unlock
→ Set<
T> -
Unlocks the set, returning a regular (mutable, ordered) Set
of type LinkedHashSet. This set is "safe", in the sense that is independent
from the original ISet.
no setterinherited
-
unlockLazy
→ Set<
T> -
Unlocks the set, returning a safe, modifiable (mutable) Set.
Using this is very fast at first, since it makes no copies of the ISet
items. However, if and only if you use a method that mutates the set,
like add, it will unlock internally (make a copy of all ISet items).
This is transparent to you, and will happen at most only once. In other
words, it will unlock the ISet, lazily, only if necessary.
If you never mutate the set, it will be very fast to lock this set
back into an ISet.
no setterinherited
-
unlockView
→ Set<
T> -
Unlocks the set, returning a safe, unmodifiable (immutable) Set view.
The word "view" means the set is backed by the original ISet.
Using this is very fast, since it makes no copies of the ISet items.
However, if you try to use methods that modify the set, like add,
it will throw an UnsupportedError.
It is also very fast to lock this set back into an ISet.
no setterinherited
-
wait
→ Future<
List< T> > -
Available on Iterable<
Waits for futures in parallel.Future< , provided by the FutureIterable extensionT> >no setter -
withDeepEquals
→ ISet<
T> -
Creates a set with
deepEquals
(compares all set items by equality).no setterinherited -
withIdentityEquals
→ ISet<
T> -
Creates a set with
identityEquals
(compares the internals byidentity
).no setterinherited
Methods
-
add(
T item) → ISet< T> -
Returns a new set containing the current set plus the given item.
inherited
-
addAll(
Iterable< T> ? items) → ISet<T> -
Returns a new set containing the current set plus all the given items.
inherited
-
all(
bool test(T t)) → bool -
Available on Iterable<
Checks whether every element of this Iterable satisfiesT> , provided by the ElementalOnIterable extensiontest
. -
any(
Predicate< T> test) → bool -
Checks whether any element of this iterable satisfies
test
.inherited -
anyIs(
T value) → bool -
Available on Iterable<
ReturnsT> , provided by the FicIterableExtension extensiontrue
if any item is equal tovalue
. -
ap<
B> (Iterable< B Function(T)> iterable) → Iterable<B> -
Available on Iterable<
Apply all the functions insideT> , provided by the ElementalOnIterable extensioniterable
to this Iterable. -
append(
T element) → Iterable< T> -
Available on Iterable<
InsertT> , provided by the ElementalOnIterable extensionelement
at the end of the Iterable. -
asList(
) → List< T> -
Available on Iterable<
Returns a List containing the elements of this iterable. If the Iterable is already a List, return the same instance (nothing new is created). Otherwise, create a new List from it. See also: Dart's native toList, which always creates a new list.T> , provided by the FicIterableExtension extension -
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 -
asSet(
) → Set< T> -
Available on Iterable<
Creates a Set containing the same elements as this iterable. If the Iterable is already a Set, return the same instance (nothing new is created). Otherwise, create a new Set from it. See also: Dart's native toSet, which always creates a new set.T> , provided by the FicIterableExtension extension -
averageBy<
N extends num> (N mapper(T element)) → double -
Available on Iterable<
The arithmetic mean of the elements of a non-empty iterable. The arithmetic mean is the sum of the elements divided by the number of elements. If iterable is empty it returns 0. Examples:T> , provided by the FicIterableExtension extension -
breakI(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is longest prefix (possibly empty) of this Iterable with elements that do not satisfyT> , provided by the ElementalOnIterable extensiontest
and second element is the remainder of the Iterable. -
byName(
String name) → T -
Available on Iterable<
Finds the enum value in this list with nameT> , provided by the EnumByName extensionname
. -
cast<
R> () → Iterable< R> -
Returns an iterable of
R
instances. If this set contains instances which cannot be cast toR
, it will throw an error.inherited -
clear(
) → ISet< T> -
Returns an empty set with the same configuration.
inherited
-
concat(
Iterable< T> other) → Iterable<T> -
Available on Iterable<
Creates the lazy concatenation of this Iterable andT> , provided by the ElementalOnIterable extensionother
. -
contains(
covariant T? element) → bool -
Returns
true
if the collection contains an element equal toelement
,false
otherwise.inherited -
containsAll(
Iterable< T> other) → bool -
Returns whether this ISet contains all the elements of
other
.inherited -
deepEquals(
Iterable? other, {bool ignoreOrder = false}) → bool -
Available on Iterable<
Compare all items, in order or not, according toT> , provided by the FicIterableExtension extensionignoreOrder
, using operator ==. Return true if they are all the same, in the same order. -
deepEqualsByIdentity(
Iterable? other, {bool ignoreOrder = false}) → bool -
Available on Iterable<
Return true if they are all the same, in the same order. Compare all items, in order or not, according toT> , provided by the FicIterableExtension extensionignoreOrder
, using identical. Return true if they are all the same, in the same order. -
delete(
T element) → Iterable< T> -
Available on Iterable<
Remove the first occurrence ofT> , provided by the ElementalOnIterable extensionelement
from this Iterable. -
difference(
Iterable< T> other) → ISet<T> -
Returns a new set with the elements of this that are not in
other
.inherited -
drop(
int n) → Iterable< T> -
Available on Iterable<
Return the suffix of this Iterable after the firstT> , provided by the ElementalOnIterable extensionn
elements. -
dropRight(
[int count = 1]) → Iterable< T> -
Available on Iterable<
Drops the lastT> , provided by the ElementalOnIterable extensioncount
element of this iterable. -
dropWhileLeft(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Remove all elements starting from the first as long asT> , provided by the ElementalOnIterable extensiontest
returnstrue
. -
elem(
T element) → bool -
Available on Iterable<
Check ifT> , provided by the ElementalOnIterable extensionelement
is contained inside this Iterable. -
elementAt(
int index) → T -
Returns the
index
th element.inherited -
elementAtOrNull(
int index) → T? -
Available on Iterable<
The element at positionT> , provided by the IterableExtensions extensionindex
of this iterable, ornull
. -
equalItems(
covariant Iterable? other) → bool -
Will return
true
only if the ISet has the same number of items as the iterable, and the ISet items are equal to the iterable items, in whatever order. This may be slow for very large sets, since it compares each item, one by one.inherited -
equalItemsAndConfig(
ISet? other) → bool -
Will return
true
only if the set items are equal and the set configurations are equal. This may be slow for very large sets, since it compares each item, one by one.inherited -
every(
Predicate< T> test) → bool -
Checks whether every element of this iterable satisfies
test
.inherited -
everyIs(
T value) → bool -
Available on Iterable<
ReturnsT> , provided by the FicIterableExtension extensiontrue
if all items are equal tovalue
. -
expand<
E> (Iterable< E> f(T), {ConfigSet? config}) → Iterable<E> -
Expands each element of this ISet into zero or more elements.
inherited
-
filter(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Returns the list of those elements that satisfyT> , provided by the ElementalOnIterable extensiontest
. -
filterWithIndex(
bool test(T t, int index)) → Iterable< T> -
Available on Iterable<
Returns the list of those elements that satisfyT> , provided by the ElementalOnIterable extensiontest
. -
findDuplicates(
) → Set< T> -
Available on Iterable<
Finds duplicates and then returns a Set with the duplicated elements. If there are no duplicates, an empty Set is returned.T> , provided by the FicIterableExtension extension -
firstOr(
T orElse) → T -
Returns the first element, or
orElse
if the set is empty.inherited -
firstWhere(
Predicate< T> test, {T orElse()?}) → T -
Iterates through elements and returns the first to satisfy
test
.inherited -
flatMap<
B> (Iterable< B> toElements(T t)) → Iterable<B> -
Available on Iterable<
For each element of the Iterable apply functionT> , provided by the ElementalOnIterable extensiontoElements
and flat the result. -
flatMapWithIndex<
B> (Iterable< B> toElements(T t, int index)) → Iterable<B> -
Available on Iterable<
Same asT> , provided by the ElementalOnIterable extensionflatMap
(extend
) but provides also theindex
of each mapped element in the mapping function (toElements
). -
fold<
E> (E initialValue, E combine(E previousValue, T element)) → E -
Reduces a collection to a single value by iteratively combining eac element of the collection
with an existing value.
inherited
-
foldLeft<
B> (B initialValue, B combine(B b, T t)) → B -
Available on Iterable<
Fold this Iterable into a single value by aggregating each element of the list from the first to the last.T> , provided by the ElementalOnIterable extension -
foldLeftWithIndex<
B> (B initialValue, B combine(B previousValue, T element, int index)) → B -
Available on Iterable<
Same asT> , provided by the ElementalOnIterable extensionfoldLeft
(fold
) but provides also theindex
of each mapped element in thecombine
function. -
followedBy(
Iterable< T> other) → Iterable<T> -
Returns the lazy concatenation of this iterable and
other
.inherited -
forEach(
void f(T element)) → void -
Applies the function
f
to each element of this collection in iteration order.inherited -
insertBy(
Order< T> order, T element) → Iterable<T> -
Available on Iterable<
InsertT> , provided by the ElementalOnIterable extensionelement
into the list at the first position where it is less than or equal to the next element based onorder
(Order). -
insertWith<
A> (A extract(T instance), Order< A> order, T element) → Iterable<T> -
Available on Iterable<
InsertT> , provided by the ElementalOnIterable extensionelement
into the Iterable at the first position where it is less than or equal to the next element based onorder
(Order). -
intersect(
Iterable< T> iterable) → Iterable<T> -
Available on Iterable<
Return the intersection of two Iterable (all the elements that both Iterable have in common).T> , provided by the ElementalOnIterable extension -
intersection(
Iterable< T> other) → ISet<T> -
Returns a new set which is the intersection between this set and
other
.inherited -
intersectsWith(
Iterable< T> other) → bool -
Available on Iterable<
Returns true if this Iterable has any items in common with theT> , provided by the FicIterableExtension extensionother
Iterable. This method is as performant as possible, but it will be faster if any of the Iterables is a Set or an ISet. -
intersperse(
T middle) → Iterable< T> -
Available on Iterable<
Return an Iterable placing anT> , provided by the ElementalOnIterable extensionmiddle
in between elements of the this Iterable. -
isFirst(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitem
is the same (by identity) as the first iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you have the first item. For example: -
isLast(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitem
is the same (by identity) as the last iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you have the last item. For example: -
isNotFirst(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitem
is NOT the same (by identity) as the first iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you don't have the first item. For example: -
isNotLast(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitem
is NOT the same (by identity) as the last iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you don't have the last item. For example: -
join(
[String separator = ""]) → String -
Converts each element to a String and concatenates the strings with the
separator
in-between each concatenation.inherited -
lastOr(
T orElse) → T -
Returns the last element, or
orElse
if the set is empty.inherited -
lastWhere(
Predicate< T> test, {T orElse()?}) → T -
Returns the last element that satisfies the given predicate
test
.inherited -
lengthCompare(
Iterable others) → bool -
Compare with
others
lengthinherited -
lookup(
T element) → T? -
If an object equal to
object
is in the set, return it.inherited -
map<
E> (E f(T element), {ConfigSet? config}) → Iterable< E> -
Returns an Iterable with elements that are created by calling
f
on each element of this ISet in iteration order.inherited -
mapIndexedAndLast<
R> (R convert(int index, T item, bool isLast)) → Iterable< R> -
Available on Iterable<
Maps each element and its index to a new value. This is similar toT> , provided by the FicIterableExtension extensionmapIndexed
but also tells you which item is the last. -
mapNotNull<
E> (E? f(T? e)) → Iterable< E> -
Available on Iterable<
Similar to map, but MAY return a non-nullable type.T?> , provided by the FicIterableExtensionTypeNullable extension -
mapWithIndex<
B> (B toElement(T t, int index)) → Iterable< B> -
Available on Iterable<
Same asT> , provided by the ElementalOnIterable extensionmap
but provides also theindex
of each mapped element in the mapping function (toElement
). -
maximumBy(
Order< T> order) → Option<T> -
Available on Iterable<
The largest element of this Iterable based onT> , provided by the ElementalOnIterable extensionorder
. -
minimumBy(
Order< T> order) → Option<T> -
Available on Iterable<
The least element of this Iterable based onT> , provided by the ElementalOnIterable extensionorder
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notElem(
T element) → bool -
Available on Iterable<
Check ifT> , provided by the ElementalOnIterable extensionelement
is not contained inside this Iterable. -
partition(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record containing the values of this Iterable for whichT> , provided by the ElementalOnIterable extensiontest
isfalse
in the first element, and the values for which it istrue
in the second element. -
prepend(
T element) → Iterable< T> -
Available on Iterable<
InsertT> , provided by the ElementalOnIterable extensionelement
at the beginning of the Iterable. -
prependAll(
Iterable< T> other) → Iterable<T> -
Available on Iterable<
Insert all the elements insideT> , provided by the ElementalOnIterable extensionother
at the beginning of the Iterable. -
reduce(
T combine(T value, T element)) → T -
Reduces a collection to a single value by iteratively combining elements of the collection
using the provided function.
inherited
-
remove(
T item) → ISet< T> -
Returns a new set containing the current set minus the given item.
However, if the given item didn't exist in the current set,
it will return the current set (same instance).
inherited
-
removeAll(
Iterable< Object?> elements) → ISet<T> -
Removes each element of
elements
from this set.inherited -
removeWhere(
Predicate< T> test) → ISet<T> -
Removes all elements of this set that satisfy
test
.inherited -
restrict(
T? item, {required T orElse}) → T -
Available on Iterable<
Restricts some item to one of those present in this iterable.T> , provided by the FicIterableExtension extension -
retainAll(
Iterable< Object?> elements) → ISet<T> -
Removes all elements of this set that are not elements in
elements
.inherited -
retainWhere(
Predicate< T> test) → ISet<T> -
Removes all elements of this set that fail to satisfy
test
.inherited -
same(
ISet< T> ? other) → bool -
Will return
true
only if the sets internals are the same instances (comparing by identity). This will be fast even for very large sets, since it doesn't compare each item.override -
singleOr(
T orElse) → T -
Checks if the set has only one element, and returns that element.
Return
null
if the set is empty or has more than one element.inherited -
singleWhere(
Predicate< T> test, {T orElse()?}) → T -
Returns the single element that satisfies
test
.inherited -
skip(
int count) → Iterable< T> -
Returns an ISet that provides all but the first
count
elements.inherited -
skipWhile(
bool test(T value)) → Iterable< T> -
Returns an ISet that skips leading elements while
test
is satisfied.inherited -
sortBy(
Order< T> order) → List<T> -
Available on Iterable<
Sort this List based onT> , provided by the ElementalOnIterable extensionorder
(Order). -
sortedLike(
Iterable ordering) → List< T> -
Available on Iterable<
Returns a list, sorted according to the order specified by theT> , provided by the FicIterableExtension extensionordering
iterable. Items which don't appear inordering
will be included in the end, in their original order. Items ofordering
which are not found in the original list are ignored. -
sortedReversed(
[Comparator< T> ? compare]) → List<T> -
Available on Iterable<
Creates a reversed sorted list of the elements of the iterable.T> , provided by the FicIterableExtension extension -
sortWith<
A> (A extract(T t), Order< A> order) → List<T> -
Available on Iterable<
Sort this Iterable based onT> , provided by the ElementalOnIterable extensionorder
of an object of typeA
extracted fromT
usingextract
. -
sortWithDate(
DateTime getDate(T instance)) → List< T> -
Available on Iterable<
Sort this Iterable based on DateTime extracted from typeT> , provided by the ElementalOnIterable extensionT
usinggetDate
. -
span(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is longest prefix (possibly empty) of this Iterable with elements that satisfyT> , provided by the ElementalOnIterable extensiontest
and second element is the remainder of the Iterable. -
splitAt(
int n) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is an Iterable with the firstT> , provided by the ElementalOnIterable extensionn
elements of this Iterable, and the second element contains the rest of the Iterable. -
sumBy<
N extends num> (N mapper(T element)) → N -
Available on Iterable<
The sum of the values returned by theT> , provided by the FicIterableExtension extensionmapper
function. -
take(
int count) → Iterable< T> -
Returns an ISet of the
count
first elements of this iterable.inherited -
takeWhile(
bool test(T value)) → Iterable< T> -
Returns an ISet of the leading elements satisfying
test
.inherited -
takeWhileLeft(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Extract all elements starting from the first as long asT> , provided by the ElementalOnIterable extensiontest
returnstrue
. -
toggle(
T item) → ISet< T> -
Removes the element, if it exists in the set.
Otherwise, adds it to the set.
inherited
-
toIList(
{int compare(T a, T b)?, ConfigList? config}) → IList< T> -
Returns a IList with all items from the set.
inherited
-
toIList(
[ConfigList? config]) → IList< T> -
Available on Iterable<
Creates an immutable list (IList) from the iterable.T> , provided by the FicIterableExtension extension -
toISet(
[ConfigSet? config]) → ISet< T> -
Available on Iterable<
Creates an immutable set (ISet) from the iterable.T> , provided by the FicIterableExtension extension -
toJson(
Object? toJsonT(T)) → Object -
Converts to JSon. Json serialization support for json_serializable with @JsonSerializable.
inherited
-
toList(
{bool growable = true, int compare(T a, T b)?}) → List< T> -
Returns a List with all items from the set.
inherited
-
toSet(
{int compare(T a, T b)?}) → Set< T> -
Returns a Set with all items from the ISet.
inherited
-
toString(
[bool? prettyPrint]) → String -
Returns a string representation of (some of) the elements of
this
.inherited -
union(
Iterable< T> other) → ISet<T> -
Returns a new set which contains all the elements of this set and
other
.inherited -
unorderedEqualItems(
covariant Iterable? other) → bool -
Will return
true
only if the ISet and the iterable items have the same number of elements, and the elements of the ISet can be paired with the elements of the iterable, so that each pair is equal. This may be slow for very large sets, since it compares each item, one by one.inherited -
unzip(
) → Tuple2< Iterable< U> , Iterable<V> > -
Available on Iterable<
Iterable Tuple2 as IterableTuple2< , provided by the FICZipExtension extensionU, V> > -
updateById(
Iterable< T> newItems, dynamic id(T item)) → List<T> -
Available on Iterable<
Returns a new list whereT> , provided by the FicIterableExtension extensionnewItems
are added or updated, by theirid
(and theid
is a function of the item), like so: -
where(
Predicate< T> test) → Iterable<T> -
Returns an ISet with all elements that satisfy the predicate
test
.inherited -
whereNoDuplicates(
{dynamic by(T item)?, bool removeNulls = false}) → Iterable< T> -
Available on Iterable<
Removes all duplicates, leaving only the distinct items. Optionally, you can provide anT> , provided by the FicIterableExtension extensionby
function to compare the items. -
whereType<
E> () → Iterable< E> -
Returns an ISet with all elements that have type
E
.inherited -
withConfig(
ConfigSet config) → ISet< T> -
Creates a new set with the given
config
.inherited -
withConfigFrom(
ISet< T> other) → ISet<T> -
Returns a new set with the contents of the present ISet,
but the config of
other
.inherited -
zip<
B> (Iterable< B> iterable) → Iterable<(T, B)> -
Available on Iterable<
T> , provided by the ElementalOnIterable extensionzip
is used to join elements at the same index from two different Iterable into one Iterable of a record. -
zipWith<
B, C> (C combine(T t, B b), Iterable< B> iterable) → Iterable<C> -
Available on Iterable<
Join elements at the same index from two different Iterable into one Iterable containing the result of callingT> , provided by the ElementalOnIterable extensioncombine
on each element pair.
Operators
-
operator +(
Iterable< T> other) → ISet<T> -
Returns the concatenation of this set and
other
. Returns a new set containing the elements of this set followed by the elements ofother
.inherited -
operator ==(
Object other) → bool -
If isDeepEquals configuration is
true
: Will returntrue
only if the set items are equal (and in the same order), and the set configurations are equal. This may be slow for very large sets, since it compares each item, one by one.If isDeepEquals configuration is
false
: Will returntrue
only if the sets internals are the same instances (comparing by identity). This will be fast even for very large sets, since it doesn't compare each item.inherited -
operator [](
int index) → T -
Returns the
index
th element.inherited