System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="7.0.0-preview.5.22301.12" />

.NET API 196,216 bytes

 ImmutableSortedSet<T>

Represents an immutable sorted set implementation. NuGet package: System.Collections.Immutable (about immutable collections and how to install)

Represents a sorted set that enables changes with little or no memory allocations, and efficiently manipulates or builds immutable sorted sets. NuGet package: System.Collections.Immutable (about immutable collections and how to install)

Enumerates the contents of a binary tree. NuGet package: System.Collections.Immutable (about immutable collections and how to install)

public static readonly ImmutableSortedSet<T> Empty

Gets an empty immutable sorted set.

public int Count { get; }

Gets the number of elements in the immutable sorted set.

public bool IsEmpty { get; }

Gets a value that indicates whether this immutable sorted set is empty.

public T this[int index] { get; }

Gets the element of the immutable sorted set at the given index.

public IComparer<T> KeyComparer { get; }

Gets the comparer used to sort keys in the immutable sorted set.

public T Max { get; }

Gets the maximum value in the immutable sorted set, as defined by the comparer.

public T Min { get; }

Gets the minimum value in the immutable sorted set, as defined by the comparer.

public ImmutableSortedSet<T> Add(T value)

Adds the specified value to this immutable sorted set.

Removes all elements from the immutable sorted set.

public bool Contains(T value)

Determines whether this immutable sorted set contains the specified value.

Removes a specified set of items from this immutable sorted set.

Returns an enumerator that iterates through the immutable sorted set.

public int IndexOf(T item)

Gets the position within this immutable sorted set that the specified value appears in.

Creates an immutable sorted set that contains elements that exist both in this set and in the specified set.

public bool IsProperSubsetOf(IEnumerable<T> other)

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

public bool IsProperSupersetOf(IEnumerable<T> other)

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

public bool IsSubsetOf(IEnumerable<T> other)

Determines whether the current immutable sorted set is a subset of a specified collection.

public bool IsSupersetOf(IEnumerable<T> other)

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

public T& modreq(System.Runtime.InteropServices.InAttribute) ItemRef(int index)

Gets a read-only reference of the element of the set at the given index.

public bool Overlaps(IEnumerable<T> other)

Determines whether the current immutable sorted set and a specified collection share common elements.

public ImmutableSortedSet<T> Remove(T value)

Removes the specified value from this immutable sorted set.

public IEnumerable<T> Reverse()

Returns an IEnumerable<T> that iterates over this immutable sorted set in reverse order.

public bool SetEquals(IEnumerable<T> other)

Determines whether the current immutable sorted set and the specified collection contain the same elements.

Creates an immutable sorted set that contains elements that exist either in this set or in a given sequence, but not both.

public Builder<T> ToBuilder()

Creates a collection that has the same contents as this immutable sorted set that can be efficiently manipulated by using standard mutable interfaces.

public bool TryGetValue(T equalValue, out T actualValue)

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

public ImmutableSortedSet<T> Union(IEnumerable<T> other)

Adds a given set of items to this immutable sorted set.

public ImmutableSortedSet<T> WithComparer(IComparer<T> comparer)

Returns the immutable sorted set that has the specified key comparer.