xtd 0.2.0
Loading...
Searching...
No Matches
equality_comparer.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "helpers/equator.hpp"
7#include "helpers/hasher.hpp"
8
10namespace xtd {
12 namespace collections {
14 namespace generic {
34 template<typename type_t>
35 class equality_comparer : public iequality_comparer<type_t> {
36 public:
38
44
46
56 bool equals(const type_t& x, const type_t& y) const noexcept override {
58 }
59
66 xtd::size get_hash_code(const type_t& obj) const noexcept override {
68 }
70
71 private:
72 equality_comparer() = default;
73 };
74 }
75 }
76}
Provides a base class for implementations of the xtd::collections::generic::iequality_comparer <type_...
Definition equality_comparer.hpp:35
xtd::size get_hash_code(const type_t &obj) const noexcept override
Returns a hash code for the specified object.
Definition equality_comparer.hpp:66
static equality_comparer default_equality_comparer()
Gets the default equality comparer for the type specified by the generic argument.
Definition equality_comparer.hpp:42
bool equals(const type_t &x, const type_t &y) const noexcept override
Determines whether the specified objects are equal.
Definition equality_comparer.hpp:56
Defines methods to support the comparison of objects for equality.
Definition iequality_comparer.hpp:34
Contains xtd::collections::generic::helpers::equator struct.
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
@ y
The Y key.
@ x
The X key.
Contains xtd::collections::generic::helpers::hasher struct.
Contains xtd::collections::iequality_comparer alias.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Implements a function object for performing comparisons. Unless specialised, invokes operator== on ty...
Definition equator.hpp:37
Implements a function object for hashing data.
Definition hasher.hpp:38