mapToSet<R> method
Creates a Set with all elements of this Iterable
modified by toElement
.
The Set is modifiable if modifiable
is true.
Implementation
Set<R> mapToSet<R>(R Function(T e) toElement, {bool modifiable = false}) {
return modifiable
? map<R>(toElement).toSet()
: map<R>(toElement).toUnmodifiableSet();
}