Interface IImmutableValueList<T>
- Namespace
- GuildWars2.Collections
- Assembly
- GuildWars2.dll
Represents an immutable list with value semantics for equality comparison.
[JsonConverter(typeof(ImmutableValueListJsonConverterFactory))]
public interface IImmutableValueList<T> : IImmutableList<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, IEquatable<IImmutableValueList<T>>
Type Parameters
TThe type of elements in the list.
- Inherited Members
Remarks
This interface extends IImmutableList<T> with value-based equality and covariant return types. The shadowed members return IImmutableValueList<T> instead of IImmutableList<T>, satisfying the Liskov Substitution Principle: the more specific return type is still assignable to the base type.
C# does not support return type covariance on interface implementations directly,
so member shadowing with the new keyword is used to achieve the same effect.
Methods
- Add(T)
Makes a copy of the list, and adds the specified object to the end of the copied list.
- AddRange(IEnumerable<T>)
Makes a copy of the list and adds the specified objects to the end of the copied list.
- Clear()
Creates a list with all the items removed, but with the same sorting and ordering semantics as this list.
- Insert(int, T)
Inserts the specified element at the specified index in the immutable list.
- InsertRange(int, IEnumerable<T>)
Inserts the specified elements at the specified index in the immutable list.
- Remove(T, IEqualityComparer<T>?)
Removes the first occurrence of a specified object from this immutable list.
- RemoveAll(Predicate<T>)
Removes all the elements that match the conditions defined by the specified predicate.
- RemoveAt(int)
Removes the element at the specified index of the immutable list.
- RemoveRange(IEnumerable<T>, IEqualityComparer<T>?)
Removes the specified object from the list.
- RemoveRange(int, int)
Removes a range of elements from the IImmutableList<T>.
- Replace(T, T, IEqualityComparer<T>?)
Returns a new list with the first matching element in the list replaced with the specified element.
- SetItem(int, T)
Replaces an element in the list at a given position with the specified element.