System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="8.0.0-preview.2.23128.3" />

.NET API 245,424 bytes

 IImmutableSet<T>

A set of elements that can only be modified by creating a new instance of the set.
IImmutableSet<T> Add(T value)

Adds the specified value to this set.

Gets an empty set that retains the same sort or unordered semantics that this instance has.

bool Contains(T value)

Determines whether this set contains the specified value.

Removes a given set of items from this set.

Produces a set that contains elements that exist in both this set and the specified set.

Determines whether the current set is a proper (strict) subset of a specified collection.

Determines whether the current set is a proper superset of a specified collection.

bool IsSubsetOf(IEnumerable<T> other)

Determines whether a set is a subset of a specified collection.

bool IsSupersetOf(IEnumerable<T> other)

Determines whether the current set is a superset of a specified collection.

bool Overlaps(IEnumerable<T> other)

Determines whether the current set overlaps with the specified collection.

IImmutableSet<T> Remove(T value)

Removes the specified value from this set.

bool SetEquals(IEnumerable<T> other)

Checks whether a given sequence of items entirely describe the contents of this set.

Produces a set that contains elements either in this set or a given sequence, but not both.

bool TryGetValue(T equalValue, out T actualValue)

Searches the set for a given value and returns the equal value it finds, if any.

Adds a given set of items to this set.