Exposes a method that compares two objects.
Public Member Functions | |
| virtual int32 | compare (const type_t &x, const type_t &y) const =0 |
| Compares two entities and returns a value indicating whether one is less than, equal to, or greater than the other. | |
|
pure virtual |
Compares two entities and returns a value indicating whether one is less than, equal to, or greater than the other.
| x | The first entity to compare. |
| y | The second entity to compare. |
| Value | Condition |
|---|---|
| Less than zero | x is less than y. |
| Zero | x equals y. |
| Greater than zero | x is greater than y. |
Implemented in xtd::basic_string_comparer< char_t >, xtd::collections::generic::comparer< type_t >, xtd::collections::generic::comparer< xtd::any_object >, xtd::collections::generic::comparer< xtd::any_object >, and xtd::collections::generic::empty_comparer< type_t >.