TreapSetOfInt
extension type
Properties
-
base
→ TreapSetBase<int, IntNode>
-
final
-
compare
→ Comparator<int>
-
finalinherited
-
first
→ int
-
The first element in the sorted iteration order.
Throws StateError if the set is empty.
no setterinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
isEmpty
→ bool
-
Whether this set is empty.
no setterinherited
-
isNotEmpty
→ bool
-
Whether this collection has at least one element.
no setterinherited
-
iterator
→ Iterator<int>
-
An iterator over the elements of this set in ascending order.
no setterinherited
-
last
→ int
-
The last element in the sorted iteration order.
Throws StateError if the set is empty.
no setterinherited
-
length
→ int
-
The number of elements in this set.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
single
→ int
-
Checks that this iterable has only one element, and returns that element.
no setterinherited
Methods
-
add(int value)
→ bool
-
Adds
value
to the set.
inherited
-
addAll(Iterable<int> elements)
→ void
-
Adds all
elements
to this set.
inherited
-
any(bool test(int element))
→ bool
-
Checks whether any element of this iterable satisfies
test
.
inherited
-
cast<R>()
→ Set<R>
-
Provides a view of this set as a set of
R
instances.
inherited
-
clear()
→ void
-
Removes all elements from the set.
inherited
-
contains(covariant int element)
→ bool
-
Whether
value
is in the set.
inherited
-
containsAll(Iterable<Object?> other)
→ bool
-
Whether this set contains all the elements of
other
.
inherited
-
difference(TreapSetOfInt other)
→ TreapSetOfInt
-
Returns a new set with the elements of this set that are not in
other
.
override
-
elementAt(int index)
→ int
-
Returns the element at the given
index
in the sorted iteration order.
inherited
-
every(bool f(int element))
→ bool
-
Checks whether every element of this iterable satisfies
test
.
inherited
-
expand<T>(Iterable<T> f(int element))
→ Iterable<T>
-
Expands each element of this Iterable into zero or more elements.
inherited
-
firstWhere(bool test(int value), {int orElse()?})
→ int
-
The first element that satisfies the given predicate
test
.
inherited
-
fold<T>(T initialValue, T combine(T previousValue, int element))
→ T
-
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
inherited
-
followedBy(Iterable<int> other)
→ Iterable<int>
-
Creates the lazy concatenation of this iterable and
other
.
inherited
-
forEach(void f(int element))
→ void
-
Invokes
action
on each element of this iterable in iteration order.
inherited
-
intersection(TreapSetOfInt other)
→ TreapSetOfInt
-
Returns a new set which is the intersection of this set and
other
.
override
-
join([String separator = ""])
→ String
-
Converts each element to a String and concatenates the strings.
inherited
-
lastWhere(bool test(int value), {int orElse()?})
→ int
-
The last element that satisfies the given predicate
test
.
inherited
-
lookup(covariant int element)
→ int?
-
If an object equal to
object
is in the set, return it.
inherited
-
map<T>(T f(int element))
→ Iterable<T>
-
The current elements of this iterable modified by
toElement
.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
reduce(int combine(int value, int element))
→ int
-
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
inherited
-
remove(covariant int value)
→ bool
-
Removes
value
from the set.
inherited
-
removeAll(Iterable<Object?> elements)
→ void
-
Removes each element of
elements
from this set.
inherited
-
removeWhere(bool test(int element))
→ void
-
Removes all elements of this set that satisfy
test
.
inherited
-
retainAll(Iterable<Object?> elements)
→ void
-
Removes all elements of this set that are not elements in
elements
.
inherited
-
retainWhere(bool test(int element))
→ void
-
Removes all elements of this set that fail to satisfy
test
.
inherited
-
singleWhere(bool test(int value), {int orElse()?})
→ int
-
The single element that satisfies
test
.
inherited
-
skip(int count)
→ TreapSetOfInt
-
Returns a new set skipping the first
n
elements in sorted order.
override
-
skipWhile(bool test(int value))
→ TreapSetOfInt
-
Returns a new set skipping leading elements while
test
is true.
override
-
take(int count)
→ TreapSetOfInt
-
Returns a new set containing the first
n
elements in sorted order.
override
-
takeWhile(bool test(int value))
→ TreapSetOfInt
-
Returns a new set containing the leading elements while
test
is true.
override
-
toList({bool growable = true})
→ List<int>
-
Creates a List containing the elements of this Iterable.
inherited
-
toSet()
→ TreapSetOfInt
-
Returns a new TreapSetBase with the same elements as this set.
override
-
toString()
→ String
-
A string representation of this object.
inherited
-
union(TreapSetOfInt other)
→ TreapSetOfInt
-
Returns a new set which is the union of this set and
other
.
override
-
where(bool f(int element))
→ Iterable<int>
-
Creates a new lazy Iterable with all elements that satisfy the
predicate
test
.
inherited
-
whereType<T>()
→ Iterable<T>
-
Creates a new lazy Iterable with all elements that have type
T
.
inherited