remove method

  1. @override
bool remove(
  1. E e
)
override

Remove a single element that is equal to e.

If there are multiple elements identical to e, only the first will be removed. To remove all, use something like:

set.removeWhere((a) => a == e);

Note: when using the MappingOrderedSet implementation, this will only work if the element's priority hasn't changed since last rebalance.

Implementation

@override
bool remove(E e) {
  _cache.values.forEach((v) => v.data.remove(e));
  return _backingSet.remove(e);
}