S<T> class abstract

Implemented types
Available Extensions
Annotations
  • @visibleForOverriding

Constructors

S()

Properties

anyItem → T
Returns any item from the set.
no setter
first → T
The first element.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether this collection has no elements.
no setteroverride
isNotEmpty bool
Whether this collection has at least one element.
no setteroverride
iter Iterable<T>
no setter
iterator Iterator<T>
Returns a new Iterator that allows iterating the items of the ISet.
no setteroverride
last → T
The last element.
no setteroverride
length int
The number of elements in this.
no setteroverride
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.
no setteroverride
unlock Set<T>
Returns a Dart Set (mutable, ordered, of type LinkedHashSet).
no setter

Methods

add(T item) S<T>
Returns a new set containing the current set plus the given item. However, if the given item already exists in the set, it will return the current set (same instance).
addAll(Iterable<T> items) S<T>
Returns a new set containing the current set plus all the given items. However, if all given items already exists in the set, it will return the current set (same instance). Note: The items of items which are already in the original set will be ignored.
any(Predicate<T> test) bool
Checks whether any element of this iterable satisfies test.
override
cast<R>() Iterable<R>
A view of this iterable as an iterable of R instances.
override
contains(covariant T? element) bool
Whether the collection contains an element equal to element.
override
containsAll(Iterable<T> other) bool
difference(Set<T> other) Set<T>
elementAt(int index) → T
Returns the indexth element.
override
every(Predicate<T> test) bool
Checks whether every element of this iterable satisfies test.
override
expand<E>(Iterable<E> f(T)) Iterable<E>
Expands each element of this Iterable into zero or more elements.
override
firstWhere(Predicate<T> test, {T orElse()?}) → T
The first element that satisfies the given predicate test.
override
fold<E>(E initialValue, E combine(E previousValue, T element)) → E
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
override
followedBy(Iterable<T> other) Iterable<T>
Creates the lazy concatenation of this iterable and other.
override
forEach(void f(T element)) → void
Invokes action on each element of this iterable in iteration order.
override
getFlushed(ConfigSet? config) ListSet<T>
Returns the flushed set (flushes it only once). It is an error to use the flushed set outside of the S class.
intersection(Set<T> other) Set<T>
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
override
lastWhere(Predicate<T> test, {T orElse()?}) → T
The last element that satisfies the given predicate test.
override
lookup(T element) → T?
map<E>(E f(T element)) Iterable<E>
The current elements of this iterable modified by toElement.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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.
override
remove(T element) S<T>
singleWhere(Predicate<T> test, {T orElse()?}) → T
The single element that satisfies test.
override
skip(int count) Iterable<T>
Creates an Iterable that provides all but the first count elements.
override
skipWhile(bool test(T value)) Iterable<T>
Creates an Iterable that skips leading elements while test is satisfied.
override
take(int count) Iterable<T>
Creates a lazy iterable of the count first elements of this iterable.
override
takeWhile(bool test(T value)) Iterable<T>
Creates a lazy iterable of the leading elements satisfying test.
override
toList({bool growable = true}) List<T>
Creates a List containing the elements of this Iterable.
override
toSet() Set<T>
Creates a Set containing the same elements as this iterable.
override
toString() String
A string representation of this object.
inherited
union(Set<T> other) Set<T>
where(Predicate<T> test) Iterable<T>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
override
whereType<E>() Iterable<E>
Creates a new lazy Iterable with all elements that have type T.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → T