clear method

void clear()

Removes all values from this multimap.

Implementation

void clear() {
  if (_map.isEmpty) return;
  for (final values in _map.values) {
    if (values is List<V>) {
      values.clear();
    } else if (values is Set<V>) {
      values.clear();
    }
  }
  _map.clear();
  _length = 0;
}