Craig's Utility Library
4.0 Beta
|
Simple equality comparer More...
Public Member Functions | |
SimpleEqualityComparer (Func< T, T, bool > comparisonFunction, Func< T, int > hashFunction) | |
Initializes a new instance of the SimpleEqualityComparer<T> class. More... | |
bool | Equals (T x, T y) |
Determines if the two items are equal More... | |
int | GetHashCode (T obj) |
Get hash code More... | |
Properties | |
Func< T, T, bool > | ComparisonFunction [get, set] |
Gets or sets the comparison function. More... | |
Func< T, int > | HashFunction [get, set] |
Gets or sets the hash function. More... | |
Simple equality comparer
T | Data type |
Definition at line 31 of file SimpleEqualityComparer.cs.
Utilities.DataTypes.Comparison.SimpleEqualityComparer< T >.SimpleEqualityComparer | ( | Func< T, T, bool > | comparisonFunction, |
Func< T, int > | hashFunction | ||
) |
Initializes a new instance of the SimpleEqualityComparer<T> class.
comparisonFunction | The comparison function. |
hashFunction | The hash function. |
Definition at line 38 of file SimpleEqualityComparer.cs.
bool Utilities.DataTypes.Comparison.SimpleEqualityComparer< T >.Equals | ( | T | x, |
T | y | ||
) |
Determines if the two items are equal
x | Object 1 |
y | Object 2 |
Definition at line 62 of file SimpleEqualityComparer.cs.
int Utilities.DataTypes.Comparison.SimpleEqualityComparer< T >.GetHashCode | ( | T | obj | ) |
Get hash code
obj | Object to get the hash code of |
Definition at line 72 of file SimpleEqualityComparer.cs.
|
getsetprotected |
Gets or sets the comparison function.
The comparison function.
Definition at line 48 of file SimpleEqualityComparer.cs.
|
getsetprotected |
Gets or sets the hash function.
The hash function.
Definition at line 54 of file SimpleEqualityComparer.cs.