SetList<T> class
A set represented as a sorted list.
Constructors
-
SetList(List<
T> v, {int compare(T a, T b)?, bool infinity = false}) -
SetList.assumeSorted(List<
T> v, {bool infinity = false, int compare(T a, T b)?}) - SetList.infinity()
Properties
Methods
-
add(
T item) → int - Adds an item to the setlist if it's not already present. Returns the index of the item in the setlist.
-
clone(
) → SetList< T> -
comparisonScan(
SetList< T> other, {void onlyInThis(T a)?, void onlyInOther(T b)?, void inBoth(T a)?}) → void -
contains(
T item) → bool -
difference(
SetList< T> other) → SetList<T> -
findIndex(
T item) → int - finds either the index where item is in the set or the index where it would be inserted.
-
intersection(
SetList< T> other) → SetList<T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
T item) → void -
toString(
) → String -
A string representation of this object.
inherited
-
union(
SetList< T> other) → SetList<T>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited