xtd 0.2.0
Loading...
Searching...
No Matches

Definition

Contains generic collections definitions.

Topics

 extensions
 Contain generic collections and interfaces extensions.
 helpers
 Contains generic collections helpers definitions.

Classes

class  xtd::collections::generic::comparer< type_t >
 Provides a base class for implementations of the xtd::collections::generic::icomparer <type_t> generic interface. More...
class  xtd::collections::generic::dictionary< key_t, value_t, hasher_t, equator_t, allocator_t >
 Represents a collection of keys and values. More...
class  xtd::collections::generic::empty_comparer< type_t >
 Provides an empty comparer class. More...
class  xtd::collections::generic::enumerable_generator< type_t >
 Represents an enumerable enumerable_generator. More...
struct  xtd::collections::generic::enumerator< type_t >
 Supports a simple iteration over a generic collection. More...
struct  xtd::collections::generic::enumerator<>
 Supports a simple iteration over a generic collection. More...
class  xtd::collections::generic::equality_comparer< type_t >
 Provides a base class for implementations of the xtd::collections::generic::iequality_comparer <type_t> generic interface. More...
class  xtd::collections::generic::hash_set< type_t, hasher_t, equator_t, allocator_t >
 Represents a set of values. More...
class  xtd::collections::generic::icomparer< type_t >
 Exposes a method that compares two objects. More...
class  xtd::collections::generic::idictionary< key_t, value_t >
 Represents a generic collection of key/value pairs. More...
class  xtd::collections::generic::ienumerable< type_t >
 Exposes the enumerator, which supports a simple iteration over a collection of a specified type. More...
class  xtd::collections::generic::ienumerable_abstract
 Abstract object that represent ienumerable. More...
class  xtd::collections::generic::ienumerator< type_t >
 Supports a simple iteration over a generic collection. More...
class  xtd::collections::generic::iequality_comparer< type_t >
 Defines methods to support the comparison of objects for equality. More...
class  xtd::collections::generic::iset< type_t >
 Provides the base interface for the abstraction of sets. More...
struct  xtd::collections::generic::key_value_pair< key_t, value_t >
 Defines a key/value pair that can be set or retrieved. More...
struct  xtd::collections::generic::key_value_pair< >
 Defines a key/value pair that can be set or retrieved. More...
class  xtd::collections::generic::linked_list< type_t, allocator_t >
 Represents a doubly linked list. More...
class  xtd::collections::generic::linked_list_node< type_t >
 Represents a node in a LinkedList<T>. This class cannot be inherited. More...
class  xtd::collections::generic::list< type_t, allocator_t >
 Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists. More...
class  xtd::collections::generic::ordered_dictionary< key_t, value_t, allocator_t >
 Represents a collection of key/value pairs that are accessible by the key or index. More...
class  xtd::collections::generic::queue< type_t, container_t >
 Represents a first-in, first-out collection of objects. More...
class  xtd::collections::generic::stack< type_t, container_t >
 Represents a variable size last-in-first-out (LIFO) collection of instances of the same specified type. More...

Typedefs

template<typename key_t, typename value_t, typename lesser_t = helpers::lesser<key_t>, typename allocator_t = helpers::allocator<std::pair<const key_t, value_t >>>
using xtd::collections::generic::sorted_dictionary
 Represents a collection of key/value pairs that are sorted on the key.
template<typename key_t, typename value_t, typename allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
using xtd::collections::generic::sorted_list
 Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.
template<typename type_t, typename lesser_t = xtd::collections::generic::helpers::lesser<type_t>, typename allocator_t = xtd::collections::generic::helpers::allocator<type_t >>
using xtd::collections::generic::sorted_set
 Represents a collection of objects that is maintained in sorted order.

Typedef Documentation

◆ sorted_dictionary

template<typename key_t, typename value_t, typename lesser_t = helpers::lesser<key_t>, typename allocator_t = helpers::allocator<std::pair<const key_t, value_t >>>
using xtd::collections::generic::sorted_dictionary

#include <sorted_dictionary.hpp>

Represents a collection of key/value pairs that are sorted on the key.

Definition
template<typename key_t, typename value_t, typename lesser_t = helpers::lesser<key_t>, typename allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
Represents a generic collection of key/value pairs.
Definition idictionary.hpp:44
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
std::map< key_t, value_t, lesser_t, allocator_t > sorted_dictionary
Represents a collection of key/value pairs that are sorted on the key.
Definition sorted_dictionary.hpp:38
Header
#include <xtd/collections/generic/sorted_dictionary>
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::sorted_dictionary class is same as std::map.
A xtd::collections::generic::sorted_dictionary object maintains a sorted order without affecting performance as elements are inserted and deleted. Duplicate elements are not allowed. Changing the sort values of existing items is not supported and may lead to unexpected behavior.
Examples
The following shows how to use xtd::collections::generic::sorted_dictionary.

◆ sorted_list

template<typename key_t, typename value_t, typename allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
using xtd::collections::generic::sorted_list

#include <sorted_list.hpp>

Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.

Definition
template<typename key_t, typename value_t, typename allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
class sorted_list : public xtd::object, public xtd::collections::generic::idictionary<key_t, value_t>;
sorted_dictionary< key_t, value_t, helpers::lesser< key_t >, allocator_t > sorted_list
Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and ...
Definition sorted_list.hpp:36
Header
#include <xtd/collections/generic/sorted_list>
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::sorted_list class is same as std::map.
A xtd::collections::generic::sorted_list object maintains a sorted order without affecting performance as elements are inserted and deleted. Duplicate elements are not allowed. Changing the sort values of existing items is not supported and may lead to unexpected behavior.
Examples
The following shows how to use xtd::collections::generic::sorted_list.

◆ sorted_set

template<typename type_t, typename lesser_t = xtd::collections::generic::helpers::lesser<type_t>, typename allocator_t = xtd::collections::generic::helpers::allocator<type_t >>
using xtd::collections::generic::sorted_set

#include <sorted_set.hpp>

Represents a collection of objects that is maintained in sorted order.

Definition
template<typename type_t, typename lesser_t = xtd::collections::generic::helpers::lesser<type_t>, typename allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using sorted_set = std::set<type_t, comparer_t, allocator_t>;
std::set< type_t, lesser_t, allocator_t > sorted_set
Represents a collection of objects that is maintained in sorted order.
Definition sorted_set.hpp:37
std::allocator< type_t > allocator
Represent an allocator alias.
Definition allocator.hpp:38
Header
#include <xtd/collections/generic/sorted_set>
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::sorted_set class is same as std::set.
A xtd::collections::generic::sorted_set object maintains a sorted order without affecting performance as elements are inserted and deleted. Duplicate elements are not allowed. Changing the sort values of existing items is not supported and may lead to unexpected behavior.
Examples
The following example demonstrates how to merge two disparate sets. This example creates two xtd::collections::generic::sorted_set objects, and populates them with even and odd numbers, respectively. A third xtd::collections::generic::sorted_set object is created from the set that contains the even numbers. The example then calls the UnionWith method, which adds the odd number set to the third set.