template<typename value_t, typename enumerable_t>
class xtd::collections::generic::extensions::enumerable< value_t, enumerable_t >
Provides a set of static methods for querying objects that implement ienumerable <type_t>.
- Definition
template<typename type_t>
Represent a static object. A static class can't be instantiated (constructors are deleted).
Definition static.hpp:20
Definition enumerable.hpp:17
- Header
#include <xtd/linq/generic/extensions/enumerable>
- Namespace
- xtd::linq
- Library
- xtd.core
|
| template<xtd::func_callable< value_t, value_t, value_t > func_t> |
| auto | aggregate (func_t &&funcfunc) const -> value_t |
| | Applies an accumulator function over a sequence.
|
| template<typename accumulate_t, xtd::func_callable< accumulate_t, accumulate_t, value_t > func_t> |
| auto | aggregate (accumulate_t &&seed, func_t &&funcfunc) const -> accumulate_t |
| | Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.
|
| template<typename result_t, typename accumulate_t, xtd::func_callable< accumulate_t, accumulate_t, value_t > func_t, xtd::func_callable< result_t, value_t > result_selector_t> |
| auto | aggregate (accumulate_t &&seed, func_t &&funcfunc, result_selector_t &&result_selector) const -> result_t |
| | Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.
|
| template<xtd::predicate_callable< value_t > predicate_t> |
| auto | all (predicate_t &&predicatepredicate) const -> bool |
| | Determines whether all elements of a sequence satisfy a condition.
|
| auto | any () const noexcept -> bool |
| | Determines whether a sequence contains any elements.
|
| template<xtd::predicate_callable< value_t > predicate_t> |
| auto | any (predicate_t &&predicatepredicate) const -> bool |
| | Determines whether any element of a sequence satisfies a condition.
|
| template<typename element_t> |
| auto | append (element_t &&element) const noexcept -> xtd::collections::generic::enumerable_generator< value_t > |
| | Appends a value to the end of the sequence.
|
| auto | as_enumerable () const noexcept |
| | Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
|
| auto | average () const noexcept |
| | Computes the average of a sequence of value_t values.
|
| template<typename result_t> |
| auto | cast () const noexcept -> xtd::collections::generic::enumerable_generator< result_t > |
| | Casts the elements of an xtd::collections::generic::ienumerable to the specified type.
|
| auto | chunk (xtd::usize size) const -> xtd::collections::generic::enumerable_generator< xtd::array< value_t > > |
| | Splits the elements of a sequence into chunks of size at most size.
|
| template<xtd::iterable second_t> |
| auto | concat (second_t &&second) const noexcept -> xtd::collections::generic::enumerable_generator< value_t > |
| | Concatenates two sequences.
|
| auto | contains (value_t &&value) const noexcept -> bool |
| | Determines whether a sequence contains a specified element by using the default equality comparer.
|
| auto | contains (value_t &&value, xtd::collections::generic::iequality_comparer< value_t > &&comparer) const noexcept -> bool |
| | Determines whether a sequence contains a specified element by using a specified equality comparer.
|
| template<xtd::func_callable< bool, value_t, value_t > equater_t> |
| auto | contains (value_t &&value, equater_t &&equater) const noexcept -> bool |
| | Determines whether a sequence contains a specified element by using a specified equality comparer.
|
| auto | count () const noexcept -> xtd::usize |
| | Returns the number of elements in current sequence.
|
| template<xtd::predicate_callable< value_t > predicate_t> |
| auto | count (predicate_t &&predicatepredicate) const noexcept -> xtd::usize |
| | Returns a number that represents how many elements in the specified sequence satisfy a condition.
|
| auto | count (value_t &&value) const noexcept -> xtd::usize |
| | Returns the number of elements with the specified value.
|
| template<typename key_t, xtd::callable< key_t, value_t > key_selector_t> |
| auto | count_by (key_selector_t &&key_selector) const noexcept |
| | Returns the count of elements in the current sequence grouped by key.
|
| template<typename key_t, xtd::callable< key_t, value_t > key_selector_t> |
| auto | count_by (key_selector_t &&key_selector, xtd::collections::generic::iequality_comparer< key_t > &&key_comparer) const noexcept -> xtd::collections::generic::enumerable_generator< xtd::collections::generic::key_value_pair< key_t, xtd::usize > > |
| | Returns the count of elements in the current sequence grouped by key.
|
| template<typename key_t, xtd::callable< key_t, value_t > key_selector_t, xtd::callable< bool, key_t, key_t > key_equater_t> |
| auto | count_by (key_selector_t &&key_selector, key_equater_t &&key_equater) const noexcept -> xtd::collections::generic::enumerable_generator< xtd::collections::generic::key_value_pair< key_t, xtd::usize > > |
| | Returns the count of elements in the current sequence grouped by key.
|
| auto | default_if_empty () const noexcept -> xtd::collections::generic::enumerable_generator< value_t > |
| | Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the current sequence is empty.
|
| auto | default_if_empty (const value_t &default_value) const noexcept -> xtd::collections::generic::enumerable_generator< value_t > |
| | Returns the elements of the specified sequence or the specified value in a singleton collection if the current sequence is empty.
|
| auto | distinct () const noexcept -> xtd::collections::generic::enumerable_generator< value_t > |
| | Returns distinct elements from a sequence by using the default equality comparer to compare values.
|
| auto | distinct (xtd::collections::generic::iequality_comparer< value_t > &&comparer) const noexcept -> xtd::collections::generic::enumerable_generator< value_t > |
| | Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_comparer <type_t> to compare values.
|
| template<xtd::func_callable< bool, value_t, value_t > equater_t> |
| auto | distinct (equater_t &&equater) const noexcept -> xtd::collections::generic::enumerable_generator< value_t > |
| | Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_comparer <type_t> to compare values.
|
| template<xtd::predicate_callable< value_t > predicate_t> |
| auto | first_or_default (predicate_t &&predicatepredicate, value_t &&default_value) const noexcept -> value_t |
| | Returns the first element of the sequence that satisfies a condition, or a specified default value if no such element is found.
|
| template<xtd::predicate_callable< value_t > predicate_t> |
| auto | first_or_default (predicate_t &&predicatepredicate) const noexcept -> value_t |
| | Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
|
| auto | first_or_default (value_t &&default_value) const noexcept -> value_t |
| | Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
|
| auto | first_or_default () const noexcept -> value_t |
| | Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
|
| auto | max () const -> value_t |
| | Returns the maximum value in a sequence of xtd::numeric values.
|
template<xtd::callable< value_t, value_t > selector_t>
requires xtd::numeric<value_t> |
| auto | max (selector_t &&selector) const -> value_t |
| | Returns the maximum value in a sequence of xtd::numeric values.
|
template<typename result_t, xtd::callable< result_t, value_t > selector_t>
requires xtd::numeric<result_t> |
| auto | max (selector_t &&selector) const -> result_t |
| | Returns the maximum value in a sequence of xtd::numeric values.
|
| auto | min () const -> value_t |
| | Returns the minimum value in a sequence of xtd::numeric values.
|
template<xtd::callable< value_t, value_t > selector_t>
requires xtd::numeric<value_t> |
| auto | min (selector_t &&selector) const -> value_t |
| | Returns the minimum value in a sequence of xtd::numeric values.
|
template<typename result_t, xtd::callable< result_t, value_t > selector_t>
requires xtd::numeric<result_t> |
| auto | min (selector_t &&selector) const -> result_t |
| | Returns the minimum value in a sequence of xtd::numeric values.
|
| auto | order () const -> xtd::collections::generic::enumerable_generator< value_t > |
| | Sorts the elements of a sequence in ascending order.
|
| auto | order (const xtd::collections::generic::icomparer< value_t > &comparer) const -> xtd::collections::generic::enumerable_generator< value_t > |
| | Sorts the elements of a sequence in ascending order.
|
| template<xtd::func_callable< bool, value_t, value_t > lesser_t> |
| auto | order (lesser_t &&lesser) const -> xtd::collections::generic::enumerable_generator< value_t > |
| | Sorts the elements of a sequence in ascending order.
|
| auto | order_by (const std::function< value_t(const value_t &)> &key_selector) const |
| | Sorts the elements of a sequence in ascending order according to a key.
|
| template<typename key_t> |
| auto | order_by_descending (const std::function< key_t(const value_t &)> &key_selector) const |
| | Sorts the elements of a sequence in descending order according to a key.
|
| auto | order_by_descending (const std::function< value_t(const value_t &)> &key_selector) const |
| | Sorts the elements of a sequence in descending order according to a key.
|
| template<typename key_t> |
| auto | order_by (const std::function< key_t(const value_t &)> &key_selector) const |
| | Sorts the elements of a sequence in ascending order according to a key.
|
| auto | select (auto &&selector) const |
| | Projects each element of a sequence into a new form.
|
| template<typename result_t> |
| auto | select (auto &&selector) const |
| | Projects each element of a sequence into a new form by incorporating the element's index.
|
| auto | shuffle () const -> xtd::collections::generic::enumerable_generator< value_t > |
| | Shuffles the order of the elements of a sequence.
|
| auto | skip (xtd::usize count) -> xtd::collections::generic::enumerable_generator< value_t > |
| | Bypasses a specified number of elements in a sequence and then returns the remaining elements.
|
| auto | skip_while (auto &&predicatepredicate) -> xtd::collections::generic::enumerable_generator< value_t > |
| | Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.
|
| auto | take (xtd::usize count) -> xtd::collections::generic::enumerable_generator< value_t > |
| | Returns a specified number of contiguous elements from the start of a sequence.
|
| auto | take (const xtd::range &range) -> xtd::collections::generic::enumerable_generator< value_t > |
| | Returns a specified number of contiguous elements from the start of a sequence.
|
| auto | take_while (auto &&predicatepredicate) -> xtd::collections::generic::enumerable_generator< value_t > |
| | Returns elements from a sequence as long as a specified condition is true, and then skips the remaining elements.
|
| auto | to_array () const -> xtd::array< value_t > |
| | Creates a xtd::array <type_t> from an xtd::collections::generic::ienumerable <type_t>.
|
| auto | to_list () const -> xtd::collections::generic::list< value_t > |
| | Creates a xtd::collections::generic::list <type_t> from an xtd::collections::generic::ienumerable <type_t>.
|
| auto | where (auto &&predicatepredicate) const |
| | Filters a sequence of values based on a predicate.
|