Show / Hide Table of Contents

    Class ListSet<T>

    A set that's especially useful for small sets.

    Inheritance
    System.Object
    ListSet<T>
    Implements
    System.Collections.Generic.ISet<T>
    System.Collections.Generic.ICollection<T>
    IReadOnlySet<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Virtlink.Utilib.Collections
    Assembly: Virtlink.Utilib.dll
    Syntax
    public sealed class ListSet<T> : ISet<T>, ICollection<T>, IReadOnlySet<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    ListSet()

    Initializes a new instance of the ListSet<T> class.

    Declaration
    public ListSet()
    | Improve this Doc View Source

    ListSet(IEnumerable<T>)

    Initializes a new instance of the ListSet<T> class.

    Declaration
    public ListSet(IEnumerable<T> elements)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> elements

    The initial elements in the set.

    | Improve this Doc View Source

    ListSet(IEnumerable<T>, IEqualityComparer<T>)

    Initializes a new instance of the ListSet<T> class.

    Declaration
    public ListSet(IEnumerable<T> elements, IEqualityComparer<T> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> elements

    The initial elements in the set.

    System.Collections.Generic.IEqualityComparer<T> comparer

    The equality comparer to use; or null to use the default comparer.

    | Improve this Doc View Source

    ListSet(IEqualityComparer<T>)

    Initializes a new instance of the ListSet<T> class.

    Declaration
    public ListSet(IEqualityComparer<T> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IEqualityComparer<T> comparer

    The equality comparer to use.

    Properties

    | Improve this Doc View Source

    Comparer

    Gets the comparer used to compare elements of the set.

    Declaration
    public IEqualityComparer<T> Comparer { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEqualityComparer<T>

    The equality comparer.

    | Improve this Doc View Source

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Add(T)

    Declaration
    public bool Add(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Clear()

    Declaration
    public void Clear()
    | Improve this Doc View Source

    Contains(T)

    Declaration
    public bool Contains(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CopyTo(T[], Int32)

    Declaration
    public void CopyTo(T[] array, int arrayIndex)
    Parameters
    Type Name Description
    T[] array
    System.Int32 arrayIndex
    | Improve this Doc View Source

    ExceptWith(IEnumerable<T>)

    Declaration
    public void ExceptWith(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    | Improve this Doc View Source

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<T>
    | Improve this Doc View Source

    IntersectWith(IEnumerable<T>)

    Declaration
    public void IntersectWith(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    | Improve this Doc View Source

    IsProperSubsetOf(IEnumerable<T>)

    Declaration
    public bool IsProperSubsetOf(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsProperSupersetOf(IEnumerable<T>)

    Declaration
    public bool IsProperSupersetOf(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsSubsetOf(IEnumerable<T>)

    Declaration
    public bool IsSubsetOf(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsSupersetOf(IEnumerable<T>)

    Declaration
    public bool IsSupersetOf(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Overlaps(IEnumerable<T>)

    Declaration
    public bool Overlaps(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Remove(T)

    Declaration
    public bool Remove(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SetEquals(IEnumerable<T>)

    Declaration
    public bool SetEquals(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SymmetricExceptWith(IEnumerable<T>)

    Declaration
    public void SymmetricExceptWith(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other
    | Improve this Doc View Source

    TryGetValue(T, out T)

    Declaration
    public bool TryGetValue(T equalValue, out T actualValue)
    Parameters
    Type Name Description
    T equalValue
    T actualValue
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    UnionWith(IEnumerable<T>)

    Declaration
    public void UnionWith(IEnumerable<T> other)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> other

    Explicit Interface Implementations

    | Improve this Doc View Source

    ICollection<T>.Add(T)

    Declaration
    void ICollection<T>.Add(T item)
    Parameters
    Type Name Description
    T item
    | Improve this Doc View Source

    ICollection<T>.IsReadOnly

    Declaration
    bool ICollection<T>.IsReadOnly { get; }
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Implements

    System.Collections.Generic.ISet<T>
    System.Collections.Generic.ICollection<T>
    IReadOnlySet<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Extension Methods

    Enumerables.AsList<T>(IEnumerable<T>)
    Enumerables.OrIfEmpty<T>(IEnumerable<T>, IEnumerable<T>)
    Enumerables.ZipEqual<T1, T2, TResult>(IEnumerable<T1>, IEnumerable<T2>, Func<T1, T2, TResult>)
    Enumerables.CreateSafetyCopy<T>(IEnumerable<T>)
    • Improve this Doc
    • View Source
    Back to top Copyright - Daniel Pelsmaeker