add method
Adds the element e
to this, and returns whether the element was
added or not. If the element already exists in the collection, it isn't
added.
Implementation
@override
bool add(E e) {
final elementPriority = _mappingFunction(e);
final innerSet = _backingSet.putIfAbsent(elementPriority, () => <E>{});
final added = innerSet.add(e);
if (added) {
_length++;
_validReverseCache = false;
}
return added;
}