Contains collections definitions.
Topics | |
generic | |
Contains generic collections definitions. | |
object model | |
Contains object model collections definitions. | |
specialized | |
Contains specialized collections definitions. | |
Classes | |
class | xtd::collections::bit_array |
Manages a compact array of bit values, which are represented as booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0). More... | |
class | xtd::forms::layout::arranged_element_collection< type_t, sorter_t > |
Represents a collection of objects. More... | |
Typedefs | |
using | xtd::collections::array_list |
Represents a collection of xtd::any_object. | |
using | xtd::collections::comparer |
Exposes a method that compares two objects. | |
using | xtd::collections::dictionary_entry |
Defines a dictionary key/value pair that can be set or retrieved. | |
using | xtd::collections::enumerator |
Supports a simple iteration over a non-generic collection. | |
using | xtd::collections::hashtable |
Represents a collection of key/value pairs that are organized based on the hash code of the key. | |
using | xtd::collections::icollection |
Defines size, enumerators, and synchronization methods for all nongeneric collections. | |
using | xtd::collections::icomparer |
interface IComparer exposes a method that compares two objects. | |
using | xtd::collections::idictionary |
interface IComparer exposes a method that compares two objects. | |
using | xtd::collections::ienumerable |
Exposes an enumerator, which supports a simple iteration over a non-generic collection. | |
using | xtd::collections::ienumerator |
Supports a simple iteration over a non-generic collection. | |
using | xtd::collections::iequality_comparer |
Defines methods to support the comparison of objects for equality. | |
using | xtd::collections::ilist |
Represents a non-generic collection of objects that can be individually accessed by index. | |
using | xtd::collections::queue |
Represents a first-in, first-out collection of objects. | |
using | xtd::collections::sorted_list |
Represents a collection of xtd::any_object. | |
using | xtd::collections::stack |
Represents a collection of xtd::any_object. | |
#include <xtd.core/include/xtd/collections/array_list.hpp>
Represents a collection of xtd::any_object.
#include <xtd.core/include/xtd/collections/comparer.hpp>
Exposes a method that compares two objects.
#include <xtd.core/include/xtd/collections/dictionary_entry.hpp>
Defines a dictionary key/value pair that can be set or retrieved.
#include <xtd.core/include/xtd/collections/enumerator.hpp>
Supports a simple iteration over a non-generic collection.
#include <xtd.core/include/xtd/collections/hashtable.hpp>
Represents a collection of key/value pairs that are organized based on the hash code of the key.
#include <xtd.core/include/xtd/collections/icollection.hpp>
Defines size, enumerators, and synchronization methods for all nongeneric collections.
#include <xtd.core/include/xtd/collections/icomparer.hpp>
interface IComparer exposes a method that compares two objects.
#include <xtd.core/include/xtd/collections/idictionary.hpp>
interface IComparer exposes a method that compares two objects.
#include <xtd.core/include/xtd/collections/ienumerable.hpp>
Exposes an enumerator, which supports a simple iteration over a non-generic collection.
for each
to iterate through the collection. This example is a complete Console app. #include <xtd.core/include/xtd/collections/ienumerator.hpp>
Supports a simple iteration over a non-generic collection.
The following code example demonstrates the best practice for iterating a custom collection by implementing the xtd::collections::ienumerable and xtd::collections::ienumerator interfaces. In this example, members of these interfaces are not explicitly called, but they are implemented to support the use of for each
to iterate through the collection. This example is a complete Console app.
false
. When the enumerator is at this position, subsequent calls to xtd::collections::ienumerator::move_next also return false
. If the last call to xtd::collections::ienumerator::move_next returned false
, xtd::collections::ienumerator::current is undefined. #include <xtd.core/include/xtd/collections/iequality_comparer.hpp>
Defines methods to support the comparison of objects for equality.
using xtd::collections::ilist |
#include <xtd.core/include/xtd/collections/ilist.hpp>
Represents a non-generic collection of objects that can be individually accessed by index.
par Examples The following example demonstrates the implementation of the xtd::collections::ilist interface to create a simple, fixed-size list.
using xtd::collections::queue |
#include <xtd.core/include/xtd/collections/queue.hpp>
Represents a first-in, first-out collection of objects.
#include <xtd.core/include/xtd/collections/sorted_list.hpp>
Represents a collection of xtd::any_object.
using xtd::collections::stack |
#include <xtd.core/include/xtd/collections/stack.hpp>
Represents a collection of xtd::any_object.