add method

  1. @override
bool add(
  1. E value
)
override

Adds value to the set.

Returns true if value (or an equal value) was not yet in the set. Otherwise returns false and the required removal counter is incremented.

If a value equal to value was already in the set, it is replaced with value.

Implementation

@override
bool add(E value) {
  _counts[value] = (_counts[value] ?? 0) + 1;
  return _inner.add(value);
}