erase method
- T element
Removes all instances of element from the set. Time complexity: O(log N).
Returns the number of elements removed.
Implementation
int erase(T element) {
final count = _container.remove(element);
if (count != null) {
_size -= count;
return count;
}
return 0;
}