xtd 0.2.0
Loading...
Searching...
No Matches
xtd::iequatable< type_t > Class Template Referenceabstract
Inheritance diagram for xtd::iequatable< type_t >:
xtd::interface xtd::delegate< result_t(arguments_t...)>< value_t > xtd::enum_object< enum_t >

Definition

template<typename type_t>
class xtd::iequatable< type_t >

Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.

Namespace
xtd
Library
xtd.core
Remarks
This interface is implemented by types whose values can be equated (for example, the numeric and string classes). A value type or class implements the equals method to create a type-specific method suitable for determining equality of instances.
The icomparable<T> interface defines the compare_to method, which determines the sort order of instances of the implementing type. The iequatable<T> interface defines the equals method, which determines the equality of instances of the implementing type.

Public Methods

virtual bool equals (const type_t &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type.
 

Member Function Documentation

◆ equals()

template<typename type_t >
virtual bool xtd::iequatable< type_t >::equals ( const type_t &  ) const
pure virtualnoexcept

Indicates whether the current object is equal to another object of the same type.

Parameters
objAn object to compare with this object.
Returns
true if the current object is equal to the other parameter; otherwise, false.

Implemented in xtd::box< type_t >, xtd::console_key_info, xtd::date_time, xtd::guid, xtd::time_span, xtd::time_zone_info, xtd::toolkit, xtd::type_object, xtd::version, and xtd::uri.


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