Class EnumerableComparer<T>
An element-wise equality comparer for sequences of values.
Inheritance
System.Object
EnumerableComparer<T>
Implements
System.Collections.Generic.IEqualityComparer<System.Collections.Generic.IEnumerable<T>>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Flame.Collections
Assembly: Flame.dll
Syntax
public sealed class EnumerableComparer<T> : IEqualityComparer<IEnumerable<T>>
Type Parameters
Name | Description |
---|---|
T | The type of the elements in the sequences to compare. |
Constructors
| Improve this Doc View SourceEnumerableComparer(IEqualityComparer<T>)
Creates an equality comparer for sequences from an equality comparer for elements.
Declaration
public EnumerableComparer(IEqualityComparer<T> elementComparer)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEqualityComparer<T> | elementComparer |
Fields
| Improve this Doc View SourceDefault
An instance of an enumerable comparer based on the default element comparer.
Declaration
public static readonly EnumerableComparer<T> Default
Field Value
Type | Description |
---|---|
EnumerableComparer<T> |
Properties
| Improve this Doc View SourceElementComparer
Gets the equality comparer for sequence elements.
Declaration
public IEqualityComparer<T> ElementComparer { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEqualityComparer<T> | The equality comparer for elements. |
Methods
| Improve this Doc View SourceEquals(IEnumerable<T>, IEnumerable<T>)
Tests if two sequences of values are equal.
Declaration
public bool Equals(IEnumerable<T> x, IEnumerable<T> y)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | x | The first sequence to test. |
System.Collections.Generic.IEnumerable<T> | y | The second sequence to test. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetHashCode(IEnumerable<T>)
Hashes a sequence of values.
Declaration
public int GetHashCode(IEnumerable<T> obj)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | obj | The sequence to hash. |
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the sequence. |
Implements
System.Collections.Generic.IEqualityComparer<T>