equalItems method

  1. @override
bool equalItems(
  1. covariant Iterable? other
)
override

Will return true only if the ISet has the same number of items as the iterable, and the ISet items are equal to the iterable items, in whatever order. This may be slow for very large sets, since it compares each item, one by one.

Implementation

@override
bool equalItems(covariant Iterable? other) {
  if (other == null) return false;
  if (identical(this, other)) return true;

  if (other is ISet) {
    if (_isUnequalByHashCode(other)) return false;
    return (flush._s as SFlat).deepSetEquals(other.flush._s as SFlat);
  }

  return (flush._s as SFlat<T>).deepSetEqualsToIterable(other);
}