xtd 0.2.0
Loading...
Searching...
No Matches
xtd::collections::generic::icomparer< type_t > Class Template Referenceabstract
Inheritance diagram for xtd::collections::generic::icomparer< type_t >:
xtd::interface xtd::collections::generic::comparer< type_t > xtd::collections::generic::empty_comparer< type_t >

Definition

template<typename type_t>
class xtd::collections::generic::icomparer< type_t >

Exposes a method that compares two objects.

Definition
template<typename type_t>
Exposes a method that compares two objects.
Definition icomparer.hpp:30
#define interface_
This keyword is use to represent an interface.
Definition interface.hpp:58
Header
#include <xtd/collections/generic/icomparer
Namespace
xtd::collections::generic
Library
xtd.core

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.
 

Member Function Documentation

◆ compare()

template<typename type_t >
virtual int32 xtd::collections::generic::icomparer< type_t >::compare ( const type_t &  x,
const type_t &  y 
) const
pure virtual

Compares two entities and returns a value indicating whether one is less than, equal to, or greater than the other.

Parameters
xThe first entity to compare.
yThe second entity to compare.
Returns
A 32-bit signed integer that indicates the relative order of the entities being compared. The return value has these meanings:
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::collections::generic::comparer< type_t >, and xtd::collections::generic::empty_comparer< type_t >.


The documentation for this class was generated from the following file: