7#include "../../object.hpp"
8#include "../../iequatable.hpp"
9#include "../../static.hpp"
10#define __XTD_CORE_INTERNAL__
11#include "../../internal/__key_value_pair_definition.hpp"
12#undef __XTD_CORE_INTERNAL__
17 namespace collections {
35 template <
typename key_t,
typename value_t>
77 const key_t&
key() const noexcept {
83 const value_t&
value() const noexcept {
112 operator std::pair<key_t, value_t>() const noexcept {
return {
first,
second};}
143 template<
typename key_t,
typename value_t>
Represents text as a sequence of character units.
Definition basic_string.hpp:79
static key_value_pair< key_t, value_t > create(key_t key, value_t value)
Creates a key_value_pair from specified key and value.
Definition key_value_pair.hpp:144
Defines a key/value pair that can be set or retrieved.
Definition key_value_pair.hpp:36
key_value_pair()=default
Initializes a new instance of the key_value_pair<key_t, value_t> class with the default key and value...
bool equals(const key_value_pair &value) const noexcept override
Determines whether the specified object is equal to the current object.
Definition key_value_pair.hpp:99
value_t value_type
Representd the type of the value.
Definition key_value_pair.hpp:46
key_value_pair(const key_t &key, const value_t &value)
Initializes a new instance of the key_value_pair<key_t, value_t> class with the specified key and val...
Definition key_value_pair.hpp:61
bool equals(const object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
Definition key_value_pair.hpp:104
value_t second
Gets or sets the value in the key/value pair.
Definition key_value_pair.hpp:73
key_value_pair(const std::pair< key_t, value_t > &value)
Initializes a new instance of the key_value_pair<key_t, value_t> class with the specified key and val...
Definition key_value_pair.hpp:64
key_t key_type
Represents the type of the key.
Definition key_value_pair.hpp:44
const key_t & key() const noexcept
Gets the key in the key/value pair.
Definition key_value_pair.hpp:77
key_t first
Gets or sets the key in the key/value pair.
Definition key_value_pair.hpp:71
xtd::string to_string() const noexcept override
Returns a String representation of the key_value_pair<key_t, value_t>, using the String representatio...
key_type first_type
Represents the type of the first.
Definition key_value_pair.hpp:48
const value_t & value() const noexcept
Gets the value in the key/value pair.
Definition key_value_pair.hpp:83
value_type second_type
Represents the type of the second.
Definition key_value_pair.hpp:50
std::pair< key_t, value_t > base_type
Represents the type of the base.
Definition key_value_pair.hpp:42
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10