IImmutableQueue<T> Interface

 

Represents an immutable first-in, first-out collection of objects.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public interface IImmutableQueue<T> : IEnumerable<T>, IEnumerable

Type Parameters

T

The type of elements in the queue.

NameDescription
System_CAPS_pubpropertyIsEmpty

Gets a value that indicates whether this immutable queue is empty.

NameDescription
System_CAPS_pubmethodClear()

Returns a new queue with all the elements removed.

System_CAPS_pubmethodDequeue()

Removes the first element in the immutable queue, and returns the new queue.

System_CAPS_pubmethodEnqueue(T)

Adds an element to the end of the immutable queue, and returns the new queue.

System_CAPS_pubmethodGetEnumerator()

(Inherited from IEnumerable<T>.)

System_CAPS_pubmethodPeek()

Returns the element at the beginning of the immutable queue without removing it.

NameDescription
System_CAPS_pubmethodDequeue<T>(T)

Removes the item at the beginning of the immutable queue, and returns the new queue.(Defined by ImmutableQueue.)

System_CAPS_pubmethodToImmutableArray<T>()

Creates an immutable array from the specified collection.(Defined by ImmutableArray.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey>(Func<T, TKey>)

Overloaded. Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey>(Func<T, TKey>, IEqualityComparer<TKey>)

Overloaded. Constructs an immutable dictionary based on some transformation of a sequence.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IEqualityComparer<TKey>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableHashSet<T>()

Overloaded. Enumerates a sequence and produces an immutable hash set of its contents.(Defined by ImmutableHashSet.)

System_CAPS_pubmethodToImmutableHashSet<T>(IEqualityComparer<T>)

Overloaded. Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.(Defined by ImmutableHashSet.)

System_CAPS_pubmethodToImmutableList<T>()

Enumerates a sequence and produces an immutable list of its contents.(Defined by ImmutableList.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IComparer<TKey>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedSet<T>()

Overloaded. Enumerates a sequence and produces an immutable sorted set of its contents.(Defined by ImmutableSortedSet.)

System_CAPS_pubmethodToImmutableSortedSet<T>(IComparer<T>)

Overloaded. Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.(Defined by ImmutableSortedSet.)

Because IImmutableQueue<T> is immutable, when you change IImmutableQueue<T> using methods such as Dequeue or Enqueue, a new queue will be returned with the changes applied and the original queue remains unchanged.

Return to top
Show: