SetBuilder<E> class
Null safety
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.
read-onlyinherited
- isEmpty → bool
-
As Set.isEmpty.
read-only
- isNotEmpty → bool
-
As Set.isNotEmpty.
read-only
- length → int
-
As Set.length.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
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 non-existent 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 instantiatesSet<E>
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited