swap method
- Set<
T> other
Exchanges the contents of this set with those of other.
Implementation
void swap(Set<T> other) {
final temp = _container.toSet();
_container.clear();
_container.addAll(other._container);
other._container.clear();
other._container.addAll(temp);
}