Represents a collection of key/value pairs that are accessible by the key or index.
Public Aliases | |
| using | key_type |
| Represents the dictionary key type. | |
| using | mapped_type |
| Represents the dictionary mapped type. | |
| using | value_type |
| Represents the dictionary value type. | |
| using | size_type |
| Represents the dictionary size type. | |
| using | base_value_type |
| Represents the dictionary base value type. | |
| using | base_type |
| Represents the dictionary base type. | |
| using | list_type |
| Represents the dictionary base type. | |
| using | key_collection |
| Represents the idictionary key collection type. | |
| using | value_collection |
| Represents the idictionary value collection type. | |
Public Constructors | |
| ordered_dictionary () noexcept=default | |
| Initializes a new instance of the xtd::collections::generic::ordered_dictionary class. | |
| ordered_dictionary (const xtd::collections::generic::idictionary< key_t, value_t > &dictionary) | |
| Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that contains elements copied from the specified xtd::collections::generic::idictionary <key_t, value_t> and uses the default equality comparer for the key type. | |
| ordered_dictionary (const xtd::collections::generic::idictionary< key_t, value_t > &dictionary, const xtd::collections::generic::iequality_comparer< key_type > &comparer) | |
| Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that contains elements copied from the specified xtd::collections::generic::idictionary <key_t, value_t> and uses the default equality comparer for the key type, and uses the specified xtd::collections::generic::iequality_comparer <key_type>. | |
| ordered_dictionary (const xtd::collections::generic::ienumerable< value_type > &collection) | |
| Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that contains elements copied from the specified xtd::collections::generic::ienumerable <type_t>. | |
| ordered_dictionary (const xtd::collections::generic::ienumerable< value_type > &collection, const xtd::collections::generic::iequality_comparer< key_type > &comparer) | |
| Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that contains elements copied from the specified xtd::collections::generic::ienumerable <type_t>, and uses the specified xtd::collections::generic::iequality_comparer <key_type>. | |
| ordered_dictionary (size_t capacity) | |
| Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that is empty, has the specified initial capacit. | |
| ordered_dictionary (size_t capacity, const xtd::collections::generic::iequality_comparer< key_type > &comparer) | |
| Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that is empty, has the specified initial capacit, and uses the specified xtd::collections::generic::iequality_comparer <key_type>. | |
| ordered_dictionary (const xtd::collections::generic::iequality_comparer< key_type > &comparer) | |
| Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that is empty, and uses the specified xtd::collections::generic::iequality_comparer <key_type>. | |
| template<class input_iterator_t> | |
| ordered_dictionary (input_iterator_t first, input_iterator_t last) | |
| Initializes instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class from a variety of data sources. | |
| ordered_dictionary (const ordered_dictionary &other) noexcept | |
Initializes instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class from a variety of data sources. Optionally uses user supplied bucket_count as a minimal number of buckets to create, hash as the hash function, equal as the function to compare keys and alloc as the allocator. | |
| ordered_dictionary (ordered_dictionary &&other) noexcept=default | |
Initializes instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class from a variety of data sources. Optionally uses user supplied bucket_count as a minimal number of buckets to create, hash as the hash function, equal as the function to compare keys and alloc as the allocator. | |
| ordered_dictionary (std::initializer_list< base_value_type > init) | |
| template<class init_key_t, class init_value_t> | |
| ordered_dictionary (std::initializer_list< key_value_pair< init_key_t, init_value_t > > init) | |
| Initializes instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class from a variety of data sources. | |
Public Properties | |
| auto | count () const noexcept -> size_type override |
| Gets the number of key/value pairs contained in the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
| auto | comparer () const noexcept -> const iequality_comparer< key_t > & |
| Gets the xtd::collections::generic::iequality_comparer <type_t> that is used to determine equality of keys for the dictionary. | |
| virtual auto | items () const noexcept -> const base_type & |
| Returns the underlying base type items. | |
| virtual auto | items () noexcept -> base_type & |
| Returns the underlying base type items. | |
| auto | keys () const noexcept -> key_collection override |
| Gets a collection containing the keys in the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
| auto | values () const noexcept -> value_collection override |
| Gets a collection containing the values in the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
Public Methods | |
| auto | add (const key_t &key, const value_t &value) -> void override |
| Adds an element with the provided key and value to the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
| auto | add (const value_type &item) -> void override |
| Adds an item to the xtd::collections::generic::icollection <type_t>. | |
| auto | clear () noexcept -> void override |
| Removes all keys and values from the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
| auto | contains (const value_type &item) const noexcept -> bool override |
| Determines whether an element is in the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
| auto | contains_key (const key_t &key) const noexcept -> bool override |
| Determines whether the xtd::collections::generic::ordered_dictionary <key_t, value_t> contains the specified key. | |
| auto | contains_value (const value_t &value) const noexcept -> bool |
| Determines whether the xtd::collections::generic::ordered_dictionary <key_t, value_t> contains the specified value. | |
| auto | copy_to (xtd::array< value_type > &array, xtd::size array_index) const -> void override |
| Copies the elements of the xtd::collections::generic::icollection <type_t> to an xtd::array, starting at a particular xtd::array index. | |
| xtd::collections::generic::enumerator< value_type > | get_enumerator () const noexcept override |
| Returns an enumerator that iterates through the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
| auto | insert (xtd::size index, const key_t &key) -> void |
| Inserts a new entry into the xtd::collections::generic::ordered_dictionary collection with the specified key at the specified index. | |
| auto | insert (xtd::size index, const key_t &key, const value_t &value) -> void |
| Inserts a new entry into the xtd::collections::generic::ordered_dictionary collection with the specified key and value at the specified index. | |
| auto | remove (const key_t &key) noexcept -> bool override |
| Removes the value with the specified key from the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
| auto | remove (const value_type &item) noexcept -> bool override |
| Removes the first occurrence of a specific object from the xtd::collections::generic::ordered_dictionary <key_t, value_t>. | |
| auto | remove_at (xtd::size index) -> void |
| Removes the entry at the specified index from the OrderedDictionary collection. | |
| auto | to_string () const noexcept -> xtd::string override |
| Gets a string that represents the current object. | |
| auto | try_get_value (const key_t &key, value_t &value) const -> bool override |
| Gets the value associated with the specified key. | |
Public Operators | |
| auto | operator= (ordered_dictionary &&other) noexcept -> ordered_dictionary &=default |
Move assignment operator. Replaces the contents with a copy of the contents of other. | |
| auto | operator= (const ordered_dictionary &other) noexcept -> ordered_dictionary & |
Copy assignment operator. Replaces the contents with a copy of the contents of other. | |
| auto | operator= (std::initializer_list< base_value_type > ilist) -> ordered_dictionary & |
Copy assignment operator. Replaces the contents with a copy of the contents of other. | |
| template<class init_key_t, class init_value_t> | |
| auto | operator= (std::initializer_list< key_value_pair< init_key_t, init_value_t > > ilist) -> ordered_dictionary & |
Copy assignment operator. Replaces the contents with a copy of the contents of other. | |
| auto | operator() (xtd::size index) const -> const value_t & |
| Gets the value at the specified index. | |
| auto | operator() (xtd::size index) -> value_t & |
| Sets the value at the specified index. | |
| const value_t & | operator[] (const key_t &key) const override |
| Gets the element with the specified key. | |
| value_t & | operator[] (const key_t &key) override |
| Sets the element with the specified key. | |
| operator const base_type & () const noexcept | |
| Returns a reference to the underlying base type. | |
| operator base_type & () noexcept | |
| Returns a reference to the underlying base type. | |
Additional Inherited Members | |
| using | key_type |
| Represents the dictionary key type. | |
| using | mapped_type |
| Represents the dictionary mapped type. | |
| using | value_type |
| Represents the xtd::collections::generic::idictionary value type. | |
| using | iterator |
| Represents the iterator of xtd::collections::generic::ienumerable value type. | |
| using | const_iterator |
| Represents the const iterator of xtd::collections::generic::ienumerable value type. | |
| using | key_collection |
| Represents the idictionary key collection type. | |
| using | value_collection |
| Represents the idictionary value collection type. | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. | |
| virtual xtd::size | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. | |
| template<class object_t> | |
| xtd::unique_ptr_object< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object. | |
| template<class object_a_t, class object_b_t> | |
| static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal. | |
| template<class object_a_t, class object_b_t> | |
| static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance. | |
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::key_type |
Represents the dictionary key type.
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::mapped_type |
Represents the dictionary mapped type.
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::value_type |
Represents the dictionary value type.
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::size_type |
Represents the dictionary size type.
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::base_value_type |
Represents the dictionary base value type.
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::base_type |
Represents the dictionary base type.
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::list_type |
Represents the dictionary base type.
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::key_collection |
Represents the idictionary key collection type.
| using xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >::value_collection |
Represents the idictionary value collection type.
|
defaultnoexcept |
Initializes a new instance of the xtd::collections::generic::ordered_dictionary class.
|
inline |
Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that contains elements copied from the specified xtd::collections::generic::idictionary <key_t, value_t> and uses the default equality comparer for the key type.
| dictionary | The xtd::collections::generic::idictionary <key_t, value_t> whose elements are copied to the new xtd::collections::generic::ordered_dictionary <key_t, value_t>. |
| xtd::argument_exception | `dictionary` contains one or more duplicate keys. |
dictionary must also be unique according to the default equality comparer. key_t implements the xtd::iequatable <type_t> generic interface, the default equality comparer uses that implementation. Alternatively, you can specify an implementation of the xtd::collections::generic::iequality_comparer <type_t> generic interface by using a constructor that accepts a comparer parameter. n) operation, where n is the number of elements in dictionary.
|
inline |
Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that contains elements copied from the specified xtd::collections::generic::idictionary <key_t, value_t> and uses the default equality comparer for the key type, and uses the specified xtd::collections::generic::iequality_comparer <key_type>.
| dictionary | The xtd::collections::generic::idictionary <key_t, value_t> whose elements are copied to the new xtd::collections::generic::ordered_dictionary <key_t, value_t>. |
| comparer | The xtd::collections::generic::iequality_comparer <key_type> implementation to use when comparing keys. |
| xtd::argument_exception | `dictionary` contains one or more duplicate keys. |
dictionary must also be unique according to the default equality comparer. key_t implements the xtd::iequatable <type_t> generic interface, the default equality comparer uses that implementation. Alternatively, you can specify an implementation of the xtd::collections::generic::iequality_comparer <type_t> generic interface by using a constructor that accepts a comparer parameter. n) operation, where n is the number of elements in dictionary.
|
inline |
Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that contains elements copied from the specified xtd::collections::generic::ienumerable <type_t>.
| collection | The xtd::collections::generic::ienumerable <type_t> whose elements are copied to the new xtd::collections::generic::ordered_dictionary <key_t, value_t> |
| xtd::argument_exception | `dictionary` contains one or more duplicate keys. |
|
inline |
Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that contains elements copied from the specified xtd::collections::generic::ienumerable <type_t>, and uses the specified xtd::collections::generic::iequality_comparer <key_type>.
| collection | The xtd::collections::generic::ienumerable <type_t> whose elements are copied to the new xtd::collections::generic::ordered_dictionary <key_t, value_t> |
| comparer | The xtd::collections::generic::iequality_comparer <key_type> implementation to use when comparing keys. |
| xtd::argument_exception | `dictionary` contains one or more duplicate keys. |
|
inline |
Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that is empty, has the specified initial capacit.
| capacity | The initial number of elements that the xtd::collections::generic::ordered_dictionary <key_t, value_t> can contain. |
dictionary must also be unique according to the specified comparer.
|
inline |
Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that is empty, has the specified initial capacit, and uses the specified xtd::collections::generic::iequality_comparer <key_type>.
| capacity | The initial number of elements that the xtd::collections::generic::ordered_dictionary <key_t, value_t> can contain. |
| comparer | The xtd::collections::generic::iequality_comparer <key_type> implementation to use when comparing keys. |
dictionary must also be unique according to the specified comparer.
|
inline |
Initializes a new instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class that is empty, and uses the specified xtd::collections::generic::iequality_comparer <key_type>.
| comparer | The xtd::collections::generic::iequality_comparer <key_type> implementation to use when comparing keys. |
dictionary must also be unique according to the specified comparer.
|
inlineexplicit |
Initializes instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class from a variety of data sources.
| first | The fist iterator of the range [first, last) to copy the elements from. |
| last | Thaae last itezrator of the range [first, last) to copy the elements from. |
| xtd::argument_exception | `dictionary` contains one or more duplicate keys. |
1.0. If multiple elements in the range have keys that compare equivalent, it is unspecified which element is inserted (pending LWG2844.
|
inlinenoexcept |
Initializes instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class from a variety of data sources. Optionally uses user supplied bucket_count as a minimal number of buckets to create, hash as the hash function, equal as the function to compare keys and alloc as the allocator.
| other | Another container to be used as source to initialize the elements of the container with. |
other, copies the load factor, the predicate, and the hash function as well. If alloc is not provided, allocator is obtained by calling
|
defaultnoexcept |
Initializes instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class from a variety of data sources. Optionally uses user supplied bucket_count as a minimal number of buckets to create, hash as the hash function, equal as the function to compare keys and alloc as the allocator.
| other | Another container to be used as source to initialize the elements of the container with. |
other using move semantics. If alloc is not provided, allocator is obtained by move-construction from the allocator belonging to other.
|
inlineexplicit |
Initializes instance of the xtd::collections::generic::ordered_dictionary <key_t, value_t> class from a variety of data sources.
| init | Initializer list to initialize the elements of the container with. |
| xtd::argument_exception | `dictionary` contains one or more duplicate keys. |
|
inlineoverridenoexcept |
Gets the number of key/value pairs contained in the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
|
inlinenoexcept |
Gets the xtd::collections::generic::iequality_comparer <type_t> that is used to determine equality of keys for the dictionary.
|
inlinevirtualnoexcept |
Returns the underlying base type items.
|
inlinevirtualnoexcept |
Returns the underlying base type items.
|
inlineoverridevirtualnoexcept |
Gets a collection containing the keys in the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
Implements xtd::collections::generic::idictionary< key_t, value_t >.
|
inlineoverridevirtualnoexcept |
Gets a collection containing the values in the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
Implements xtd::collections::generic::idictionary< key_t, value_t >.
|
inlineoverridevirtual |
Adds an element with the provided key and value to the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
| key | The object to use as the key of the element to add. |
| value | The object to use as the value of the element to add. |
| xtd::argument_exception | An element with the same key already exists in the xtd::collections::generic::ordered_dictionary <key_t, value_t>. |
| xtd::not_supported_exception | The xtd::collections::generic::ordered_dictionary <key_t, value_t> is read-only. |
operator [] to add new elements by setting the value of a key that does not exist in the dictionary; for example, my_collection["my_nonexistent_key"] = my_value. However, if the specified key already exists in the dictionary, setting the operator [] overwrites the old value. In contrast, the xtd::collections::generic::ordered_dictionary::add method does not modify existing elements. Implements xtd::collections::generic::idictionary< key_t, value_t >.
|
inlineoverride |
Adds an item to the xtd::collections::generic::icollection <type_t>.
| item | The object to add to the xtd::collections::generic::icollection <type_t>. |
| xtd::not_supported_exception | The xtd::collections::generic::icollection <type_t> is read-only. |
|
inlineoverridenoexcept |
Removes all keys and values from the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
|
inlineoverridenoexcept |
Determines whether an element is in the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
| item | The object to be added to the end of the xtd::collections::generic::ordered_dictionary <key_t, value_t>. |
true if the xtd::collections::generic::ordered_dictionary <key_t, value_t> contains an element with the specified item ; otherwise, false.
|
inlineoverridevirtualnoexcept |
Determines whether the xtd::collections::generic::ordered_dictionary <key_t, value_t> contains the specified key.
| The | key to locate in the xtd::collections::generic::ordered_dictionary <key_t, value_t>. |
true if the xtd::collections::generic::ordered_dictionary <key_t, value_t> contains an element with the specified key ; otherwise, false. Implements xtd::collections::generic::idictionary< key_t, value_t >.
|
inlinenoexcept |
Determines whether the xtd::collections::generic::ordered_dictionary <key_t, value_t> contains the specified value.
| The | value to locate in the xtd::collections::generic::ordered_dictionary <key_t, value_t>. |
true if the xtd::collections::generic::ordered_dictionary <key_t, value_t> contains an element with the specified key ; otherwise, false.
|
inlineoverride |
Copies the elements of the xtd::collections::generic::icollection <type_t> to an xtd::array, starting at a particular xtd::array index.
| array | The one-dimensional xtd::array that is the destination of the elements copied from xtd::collections::generic::icollection <type_t>. The xtd::array must have zero-based indexing. |
| array_index | The zero-based index in array at which copying begins. |
| xtd::argument_exception | The number of elements in the source xtd::collections::generic::icollection <type_t> is greater than the available space from `array_index` to the end of the destination `array`. |
|
inlineoverridenoexcept |
Returns an enumerator that iterates through the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
|
inline |
Inserts a new entry into the xtd::collections::generic::ordered_dictionary collection with the specified key at the specified index.
| index | The zero-based index at which the element should be inserted. |
| key | The key of the entry to add. |
| xtd::argument_out_of_range | index is out of range. |
| xtd::not_supported_exception | The property is set and the xtd::collections::generic::ordered_dictionary <key_t, value_t> is read-only. |
|
inline |
Inserts a new entry into the xtd::collections::generic::ordered_dictionary collection with the specified key and value at the specified index.
| index | The zero-based index at which the element should be inserted. |
| key | The key of the entry to add. |
| value | The value of the entry to add. |
| xtd::argument_out_of_range | index is out of range. |
| xtd::not_supported_exception | The property is set and the xtd::collections::generic::ordered_dictionary <key_t, value_t> is read-only. |
|
inlineoverridevirtualnoexcept |
Removes the value with the specified key from the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
| key | The key of the element to remove. |
true if the element is successfully found and removed; otherwise, false. This method returns false if key is not found in the xtd::collections::generic::ordered_dictionary <key_t, value_t>. Implements xtd::collections::generic::idictionary< key_t, value_t >.
|
inlineoverridenoexcept |
Removes the first occurrence of a specific object from the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
| item | The object to remove from the xtd::collections::generic::ordered_dictionary <key_t, value_t>. |
true if item is successfully removed; otherwise, false. This method also returns false if item value was not found in the xtd::collections::generic::ordered_dictionary <key_t, value_t>.
|
inline |
Removes the entry at the specified index from the OrderedDictionary collection.
| index | The zero-based index of the entry to remove. |
| xtd::argument_out_of_range | index is out of range. |
| xtd::not_supported_exception | The property is set and the xtd::collections::generic::ordered_dictionary <key_t, value_t> is read-only. |
|
inlineoverridevirtualnoexcept |
Gets a string that represents the current object.
Reimplemented from xtd::object.
|
inlineoverridevirtual |
Gets the value associated with the specified key.
| key | The key of the value to get. |
| value | When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. |
true if the xtd::collections::generic::ordered_dictionary <key_t, value_t> contains an element with the specified key; otherwise, false. Implements xtd::collections::generic::idictionary< key_t, value_t >.
|
defaultnoexcept |
Move assignment operator. Replaces the contents with a copy of the contents of other.
| other | Another container to use as data source. |
|
inlinenoexcept |
Copy assignment operator. Replaces the contents with a copy of the contents of other.
| other | Another container to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of other.
| ilist | The initializer list to use as data source. |
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of other.
| ilist | The initializer list to use as data source. |
|
inline |
Gets the value at the specified index.
| index | The zero-based index of the value to get or set. |
| xtd::argument_out_of_range | index is out of range. |
| xtd::collections::generic::key_not_found_exception | The property is retrieved and key is not found. |
| xtd::not_supported_exception | The property is set and the xtd::collections::generic::ordered_dictionary <key_t, value_t> is read-only. |
my_collection[index].
|
inline |
Sets the value at the specified index.
| index | The zero-based index of the value to get or set. |
| xtd::argument_out_of_range | index is out of range. |
| xtd::collections::generic::key_not_found_exception | The property is retrieved and key is not found. |
| xtd::not_supported_exception | The property is set and the xtd::collections::generic::ordered_dictionary <key_t, value_t> is read-only. |
my_collection[index].
|
inlineoverride |
Gets the element with the specified key.
| key | The key of the element to get. |
| xtd::collections::generic::key_not_found_exception | The property is retrieved and key is not found. |
| xtd::not_supported_exception | The property is set and the xtd::collections::generic::ordered_dictionary <key_t, value_t> is read-only. |
my_collection[key]. operator [] to add new elements by setting the value of a key that does not exist in the dictionary; for example, my_collection["my_nonexistent_key"] = my_value. However, if the specified key already exists in the dictionary, setting the operator [] overwrites the old value. In contrast, the xtd::collections::generic::ordered_dictionary::add method does not modify existing elements.
|
inlineoverridevirtual |
Sets the element with the specified key.
| key | The key of the element to set. |
| xtd::not_supported_exception | The property is set and the xtd::collections::generic::ordered_dictionary <key_t, value_t> is read-only. |
my_collection[key]. operator [] to add new elements by setting the value of a key that does not exist in the dictionary; for example, my_collection["my_nonexistent_key"] = my_value. However, if the specified key already exists in the dictionary, setting the operator [] overwrites the old value. In contrast, the xtd::collections::generic::ordered_dictionary::add method does not modify existing elements. Implements xtd::collections::generic::idictionary< key_t, value_t >.
|
inlinenoexcept |
Returns a reference to the underlying base type.
|
inlinenoexcept |
Returns a reference to the underlying base type.