SetBuilder<E> class

The Built Collection builder for BuiltSet.

It implements the mutating part of the Set interface.

See the Built Collection library documentation for the general properties of Built Collections.

Constructors

SetBuilder([Iterable iterable = const []])
Instantiates with elements from an Iterable.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
As Set.isEmpty.
no setter
isNotEmpty bool
As Set.isNotEmpty.
no setter
length int
As Set.length.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(E value) bool
As Set.add.
addAll(Iterable<E> iterable) → void
As Set.addAll.
build() BuiltSet<E>
Converts to a BuiltSet.
clear() → void
As Set.clear.
expand(Iterable<E> f(E)) → void
As Iterable.expand, but updates the builder in place. Returns nothing.
map(E f(E)) → void
As Iterable.map, but updates the builder in place. Returns nothing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(Object? value) bool
As Set.remove.
removeAll(Iterable<Object?> elements) → void
As Set.removeAll.
removeWhere(bool test(E)) → void
As Set.removeWhere.
replace(Iterable iterable) → void
Replaces all elements with elements from an Iterable.
retainAll(Iterable<Object?> elements) → void
As Set.retainAll.
retainWhere(bool test(E)) → void
As Set.retainWhere.
skip(int n) → void
As Iterable.skip, but updates the builder in place. Returns nothing.
skipWhile(bool test(E)) → void
As Iterable.skipWhile, but updates the builder in place. Returns nothing.
take(int n) → void
As Iterable.take, but updates the builder in place. Returns nothing.
takeWhile(bool test(E)) → void
As Iterable.takeWhile, but updates the builder in place. Returns nothing.
toString() String
A string representation of this object.
inherited
update(dynamic updates(SetBuilder<E>)) → void
Applies a function to this.
where(bool test(E)) → void
As Iterable.where, but updates the builder in place. Returns nothing.
withBase(_SetFactory<E> base) → void
Uses base as the collection type for all sets created by this builder.
withDefaultBase() → void
As withBase, but sets base back to the default value, which instantiates Set<E>.

Operators

operator ==(Object other) bool
The equality operator.
inherited