Provides a base class for implementations of the xtd::collections::generic::iequality_comparer <type_t> generic interface.
type_t, and specify that this definition be used with a collection type that accepts the xtd::collections::generic::iequality_comparer <type_t> generic interface. In the xtd framework, constructors of the xtd::collections::generic::dictionary <key_t, value_t> generic collection type accept this interface. contains, index_of, last_index_of, and remove methods of the xtd::collections::generic::dictionary <key_t, value_t> class and other generic collections. Public Static Properties | |
| static const equality_comparer & | default_equality_comparer () |
| Gets the default equality comparer for the type specified by the generic argument. | |
Public Methods | |
| bool | equals (const type_t &x, const type_t &y) const noexcept override |
| Determines whether the specified objects are equal. | |
| xtd::size | get_hash_code (const type_t &obj) const noexcept override |
| Returns a hash code for the specified object. | |
Additional Inherited Members |
|
inlinestatic |
Gets the default equality comparer for the type specified by the generic argument.
|
inlineoverridevirtualnoexcept |
Determines whether the specified objects are equal.
| x | The first object of type type_t to compare. |
| y | The seco,d object of type type_t to compare. |
true if the specified objects are equal; otherwise, false. type_t. true for two objects x and y, then the value returned by the xtd::collections::generic::iequality_comparer::get_hash_code method for x must equal the value returned for y. The xtd::collections::generic::iequality_comparer::equals method is reflexive, symmetric, and transitive. That is, it returns true if used to compare an object with itself; true for two objects x and y if it is true for y and x; and true for two objects x and z if it is true for x and y and also true for y and z. Implements xtd::collections::generic::iequality_comparer< type_t >.
|
inlineoverridevirtualnoexcept |
Returns a hash code for the specified object.
| obj | The xtd::object for which a hash code is to be returned. |
type_t, corresponding to the customized equality comparison provided by the xtd::collections::generic::iequality_comparer::equals method. true for two objects x and y, then the value returned by the xtd::collections::generic::iequality_comparer::get_hash_code method for x must equal the value returned for y. Implements xtd::collections::generic::iequality_comparer< type_t >.