SetUtil class
Set algebra helpers ?union / intersection / difference / symmetric difference ?plus a few convenient constructors that preserve order via LinkedHashSet.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
difference<
T> (Set< T> a, Set<T> b) → Set<T> -
aminusb?elements inathat are not inb. -
from<
T> (Iterable< T> source) → Set<T> -
Build a LinkedHashSet from
source, preserving iteration order. -
fromMap<
T, R> (Iterable< T> source, R transform(T)) → Set<R> -
Build a LinkedHashSet from
source, applyingtransformto each element first. -
intersection<
T> (Set< T> a, Set<T> b) → Set<T> -
Intersection of
aandb?elements present in both sets. -
removeWhere<
T> (Set< T> source, bool test(T)) → int -
Remove
sourceelements that satisfytest. Returns the removed count. -
symmetricDifference<
T> (Set< T> a, Set<T> b) → Set<T> -
Symmetric difference ?elements in either
aorbbut not both. -
union<
T> (Set< T> a, Set<T> b) → Set<T> -
Union of
aandb?every element present in either set.