new Comparer(eqCompareropt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
eqComparer |
EqualityComparer.<T> |
<optional> |
Optional. Defaults to EqualityComparer.default. An EqualityComparer to use for comparing two items. The method compareTo() returns 0 if the equality comparer considers the two compared items to be equal. |
- Source:
Members
equalityComparer
- Source:
equalityComparer
- Source:
Methods
compare(x, y) → {Number}
Compare two items and return a value that indicates which of them
is considered to be less or smaller. A negative value means that
x is smaller than y; 0 means they are equally large and a positive
value means that y is larger than x.
Parameters:
Name | Type | Description |
---|---|---|
x |
T | |
y |
T |
- Source:
Returns:
Returns either -1, 0 or 1.
- Type
- Number