Provides a set of static methods for querying objects that implement ienumerable <type_t>.
Public Aliases | |
template<class type_t > | |
using | enumerator = typename xtd::collections::generic::enumerator< type_t > |
Represents the enumerator value type. | |
template<class type_t > | |
using | iequality_comparer = typename xtd::collections::generic::iequality_comparer< type_t > |
Represents the ienumerable value type. | |
template<class type_t > | |
using | ienumerable = typename xtd::collections::generic::ienumerable< type_t > |
Represents the ienumerable value type. | |
template<class type_t > | |
using | list = typename xtd::collections::generic::list< type_t > |
Represents the list value type. | |
template<class key_t , class value_t > | |
using | key_value_pair = xtd::collections::generic::key_value_pair< key_t, value_t > |
Represents the key value pair value type. | |
Public Static Methods | |
template<class source_t > | |
static source_t | aggregate (const ienumerable< source_t > &source, const std::function< source_t(const source_t &, const source_t &)> &func) |
Applies an accumulator function over a sequence. | |
template<class source_t > | |
static source_t | aggregate (const ienumerable< source_t > &source, const source_t &seed, const std::function< source_t(const source_t &, const source_t &)> &func) |
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value. | |
template<class accumulate_t , class source_t > | |
static accumulate_t | aggregate (const ienumerable< source_t > &source, const accumulate_t &seed, const std::function< accumulate_t(const source_t &, const accumulate_t &)> &func) |
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value. | |
template<class source_t > | |
static source_t | aggregate (const ienumerable< source_t > &source, const source_t &seed, const std::function< source_t(const source_t &, const source_t &)> &func, const std::function< source_t(const source_t &)> &result_selector) |
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<class result_t , class accumulate_t , class source_t > | |
static result_t | aggregate (const ienumerable< source_t > &source, const accumulate_t &seed, const std::function< accumulate_t(const source_t &, const accumulate_t &)> &func, const std::function< result_t(const accumulate_t &)> &result_selector) |
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<class source_t > | |
static bool | all (const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate) |
Determines whether all elements of a sequence satisfy a condition. | |
template<class source_t > | |
static bool | any (const ienumerable< source_t > &source) noexcept |
Determines whether a sequence contains any elements. | |
template<class source_t > | |
static bool | any (const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate) |
Determines whether any element of a sequence satisfies a condition. | |
template<class source_t > | |
static const ienumerable< source_t > & | append (const ienumerable< source_t > &source, const source_t &element) noexcept |
Appends a value to the end of the sequence. | |
template<class source_t > | |
static const ienumerable< source_t > & | as_enumerable (const ienumerable< source_t > &source) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class source_t > | |
static const ienumerable< source_t > & | as_enumerable (std::initializer_list< source_t > source) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class collection_t > | |
static const auto & | as_enumerable (const collection_t &source) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class input_iterator_t > | |
static const auto & | as_enumerable (input_iterator_t first, input_iterator_t last) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class input_iterator_t > | |
static const auto & | as_enumerable (input_iterator_t iterator, size_t length) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class source_t , size_t length> | |
static const auto & | as_enumerable (const source_t(&array)[length]) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
static xtd::decimal | average (const ienumerable< xtd::decimal > &source) |
Computes the average of a sequence of xtd::decimal values. | |
static double | average (const ienumerable< double > &source) |
Computes the average of a sequence of double values. | |
static float | average (const ienumerable< float > &source) |
Computes the average of a sequence of float values. | |
static double | average (const ienumerable< xtd::int32 > &source) |
Computes the average of a sequence of xtd::int32 values. | |
static double | average (const ienumerable< xtd::int64 > &source) |
Computes the average of a sequence of xtd::int64 values. | |
static xtd::optional< xtd::decimal > | average (const ienumerable< xtd::optional< xtd::decimal > > &source) noexcept |
Computes the average of a sequence of optional xtd::decimal values. | |
static xtd::optional< double > | average (const ienumerable< xtd::optional< double > > &source) noexcept |
Computes the average of a sequence of optional double values. | |
static xtd::optional< float > | average (const ienumerable< xtd::optional< float > > &source) noexcept |
Computes the average of a sequence of optional float values. | |
static xtd::optional< double > | average (const ienumerable< xtd::optional< xtd::int32 > > &source) noexcept |
Computes the average of a sequence of optional xtd::int32 values. | |
static xtd::optional< double > | average (const ienumerable< xtd::optional< xtd::int64 > > &source) noexcept |
Computes the average of a sequence of optional xtd::int64 values. | |
template<class result_t , class source_t > | |
static const ienumerable< result_t > & | cast (const ienumerable< source_t > &source) noexcept |
Casts the elements of an xtd::collections::generic::ienumerable to the specified type. | |
template<class source_t > | |
static const ienumerable< xtd::array< source_t > > & | chunk (const ienumerable< source_t > &source, xtd::size size) |
Splits the elements of a sequence into chunks of size at most size. | |
template<class source_t > | |
static const ienumerable< source_t > & | concat (const ienumerable< source_t > &first, const ienumerable< source_t > &second) noexcept |
Concatenates two sequences. | |
template<class source_t > | |
static bool | contains (const ienumerable< source_t > &source, const source_t &value) noexcept |
Determines whether a sequence contains a specified element by using the default equality comparer. | |
template<class source_t > | |
static bool | contains (const ienumerable< source_t > &source, const source_t &value, const xtd::collections::generic::iequality_comparer< source_t > &comparer) noexcept |
Determines whether a sequence contains a specified element by using a specified equality comparer. | |
template<class source_t > | |
static xtd::size | count (const ienumerable< source_t > &source) noexcept |
Returns the number of elements in a sequence. | |
template<class source_t > | |
static xtd::size | count (const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate) noexcept |
Returns a number that represents how many elements in the specified sequence satisfy a condition. | |
template<class source_t > | |
static xtd::size | count (const ienumerable< source_t > &source, const source_t &value) noexcept |
Returns the number of elements with the specified value. | |
template<class key_t , class source_t > | |
static const ienumerable< key_value_pair< key_t, xtd::size > > & | count_by (const ienumerable< source_t > &source, const std::function< key_t(const source_t &)> &key_selector) noexcept |
Returns the count of elements in the source sequence grouped by key. | |
template<class key_t , class source_t > | |
static const ienumerable< key_value_pair< key_t, xtd::size > > & | count_by (const ienumerable< source_t > &source, const std::function< key_t(const source_t &)> &key_selector, const iequality_comparer< key_t > &key_comparer) noexcept |
Returns the count of elements in the source sequence grouped by key. | |
template<class source_t > | |
static const ienumerable< source_t > & | default_if_empty (const ienumerable< source_t > &source) noexcept |
Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty. | |
template<class source_t > | |
static const ienumerable< source_t > & | default_if_empty (const ienumerable< source_t > &source, const source_t &default_value) noexcept |
Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty. | |
template<class source_t > | |
static source_t | first_or_default (const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate, const source_t &default_value) noexcept |
Returns the first element of the sequence that satisfies a condition, or a specified default value if no such element is found. | |
template<class source_t > | |
static source_t | first_or_default (const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate) noexcept |
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. | |
template<class source_t > | |
static source_t | first_or_default (const ienumerable< source_t > &source, const source_t &default_value) noexcept |
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. | |
template<class source_t > | |
static source_t | first_or_default (const ienumerable< source_t > &source) noexcept |
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. | |
template<class type_t > | |
static const ienumerable< type_t > & | range (type_t count) |
Generates a sequence of integral numbers within a specified range. | |
template<class type_t > | |
static const ienumerable< type_t > & | range (type_t start, type_t count) |
Generates a sequence of integral numbers within a specified range. | |
template<class type_t > | |
static const ienumerable< type_t > & | range (type_t start, type_t count, type_t step) |
Generates a sequence of integral numbers within a specified range and step. | |
template<class source_t > | |
static const ienumerable< source_t > & | from (const ienumerable< source_t > &source) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class source_t > | |
static const ienumerable< source_t > & | from (std::initializer_list< source_t > source) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class collection_t > | |
static const auto & | from (const collection_t &source) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class input_iterator_t > | |
static const auto & | from (input_iterator_t first, input_iterator_t last) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class input_iterator_t > | |
static const auto & | from (input_iterator_t iterator, size_t length) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class source_t , size_t length> | |
static const auto & | from (const source_t(&array)[length]) noexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>. | |
template<class result_t , class source_t > | |
static const ienumerable< result_t > & | select (const ienumerable< source_t > &source, const std::function< result_t(const source_t &)> &selector) |
Projects each element of a sequence into a new form. | |
template<class source_t > | |
static const ienumerable< source_t > & | select (const ienumerable< source_t > &source, const std::function< source_t(const source_t &)> &selector) |
Projects each element of a sequence into a new form. | |
template<class result_t , class source_t > | |
static const ienumerable< result_t > & | select (const ienumerable< source_t > &source, const std::function< result_t(const source_t &, xtd::size)> &selector) |
Projects each element of a sequence into a new form by incorporating the element's index. | |
template<class source_t > | |
static const ienumerable< source_t > & | select (const ienumerable< source_t > &source, const std::function< source_t(const source_t &, xtd::size)> &selector) |
Projects each element of a sequence into a new form by incorporating the element's index. | |
template<class source_t > | |
static const list< source_t > & | to_list (const ienumerable< source_t > &source) noexcept |
Creates a xtd::collections::generic::list <type_t> from an xtd::collections::generic::ienumerable <type_t>. | |
template<class source_t > | |
static const ienumerable< source_t > & | where (const ienumerable< source_t > &source, const std::function< bool(const source_t &)> &predicate) |
Filters a sequence of values based on a predicate. | |
template<class source_t > | |
static const ienumerable< source_t > & | where (const ienumerable< source_t > &source, const std::function< bool(const source_t &, xtd::size)> &predicate) |
Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function. | |
using xtd::linq::enumerable::enumerator = typename xtd::collections::generic::enumerator<type_t> |
Represents the enumerator value type.
using xtd::linq::enumerable::iequality_comparer = typename xtd::collections::generic::iequality_comparer<type_t> |
Represents the ienumerable value type.
using xtd::linq::enumerable::ienumerable = typename xtd::collections::generic::ienumerable<type_t> |
Represents the ienumerable value type.
using xtd::linq::enumerable::list = typename xtd::collections::generic::list<type_t> |
Represents the list value type.
using xtd::linq::enumerable::key_value_pair = xtd::collections::generic::key_value_pair<key_t, value_t> |
Represents the key value pair value type.
|
inlinestatic |
Applies an accumulator function over a sequence.
source_t | The type of the elements of source. |
source | An xtd::collections::generic::ienumerable <type_t> to aggregate over. |
func | An accumulator function to be invoked on each element. |
|
inlinestatic |
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.
source_t | The type of the elements of source. |
source | An xtd::collections::generic::ienumerable <type_t> to aggregate over. |
seed | The initial accumulator value. |
func | An accumulator function to be invoked on each element. |
|
inlinestatic |
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.
accumulate_t | The type of the accumulator value. |
source_t | The type of the elements of source. |
source | An xtd::collections::generic::ienumerable <type_t> to aggregate over. |
seed | The initial accumulator value. |
func | An accumulator function to be invoked on each element. |
|
inlinestatic |
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.
source_t | The type of the elements of source. |
source | An xtd::collections::generic::ienumerable <type_t> to aggregate over. |
seed | The initial accumulator value. |
func | An accumulator function to be invoked on each element. |
result_Selector | A function to transform the final accumulator value into the result value. |
|
inlinestatic |
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.
result_t | The type of the resulting value. |
accumulate_t | The type of the accumulator value. |
source_t | The type of the elements of source. |
source | An xtd::collections::generic::ienumerable <type_t> to aggregate over. |
seed | The initial accumulator value. |
func | An accumulator function to be invoked on each element. |
result_Selector | A function to transform the final accumulator value into the result value. |
|
inlinestatic |
Determines whether all elements of a sequence satisfy a condition.
source_t | The type of the elements of source. |
source | An xtd::collections::generic::ienumerable <type_t> that contains the elements to apply the predicate to. |
predicate | A function to test each element for a condition. |
true
if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false
. true
if all the pet names start with "B" or if the pets array is empty.
|
inlinestaticnoexcept |
Determines whether a sequence contains any elements.
source_t | The type of the elements of source. |
source | The xtd::collections::generic::ienumerable <type_t> to check for emptiness. |
last | The last iterator. |
true
if the source sequence contains any elements; otherwise, false
.
|
inlinestatic |
Determines whether any element of a sequence satisfies a condition.
source_t | The type of the elements of source. |
source | An xtd::collections::generic::ienumerable <type_t> that contains the elements to apply the predicate to. |
predicate | A function to test each element for a condition. |
true
if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false
. true
if all the pet names start with "B" or if the pets array is empty.
|
inlinestaticnoexcept |
Appends a value to the end of the sequence.
source_t | The type of the elements of source. |
source | A sequence of values. |
element | The value to append to source. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
source_t | The type of the elements of source. |
source | A sequence of values. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
source_t | The type of the elements of source. |
source | A sequence of values. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
collection_t | The type of the source. |
source | A sequence of values. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
input_iterator_t | The type of the source iterators. |
first | The first iterator. |
last | The last iterator. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
input_iterator_t | The type of the source iterators. |
iterator | The iterator. |
legnth | The le,gth to iterate. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
source_t | The type of the source array. |
array | The native array. |
legnth | The length of the array. |
|
static |
Computes the average of a sequence of xtd::decimal values.
source | A sequence of xtd::decimal values to calculate the average of. |
xtd::invalid_operation_exception | `source` contains no elements. |
|
static |
Computes the average of a sequence of double values.
source | A sequence of double values to calculate the average of. |
xtd::invalid_operation_exception | `source` contains no elements. |
|
static |
Computes the average of a sequence of float values.
source | A sequence of float values to calculate the average of. |
xtd::invalid_operation_exception | `source` contains no elements. |
|
static |
Computes the average of a sequence of xtd::int32 values.
source | A sequence of xtd::int32 values to calculate the average of. |
xtd::invalid_operation_exception | `source` contains no elements. |
|
static |
Computes the average of a sequence of xtd::int64 values.
source | A sequence of xtd::int64 values to calculate the average of. |
xtd::invalid_operation_exception | `source` contains no elements. |
|
staticnoexcept |
Computes the average of a sequence of optional xtd::decimal values.
source | A sequence of optional xtd::decimal values to calculate the average of. |
|
staticnoexcept |
Computes the average of a sequence of optional double values.
source | A sequence of optional double values to calculate the average of. |
|
staticnoexcept |
Computes the average of a sequence of optional float values.
source | A sequence of optional float values to calculate the average of. |
|
staticnoexcept |
Computes the average of a sequence of optional xtd::int32 values.
source | A sequence of optional xtd::int32 values to calculate the average of. |
|
staticnoexcept |
Computes the average of a sequence of optional xtd::int64 values.
source | A sequence of optional xtd::int64 values to calculate the average of. |
|
staticnoexcept |
Casts the elements of an xtd::collections::generic::ienumerable to the specified type.
result_t | The type of the resulting value. |
source_t | The type of the elements of source. |
source | The xtd::collections::generic::ienumerable that contains the elements to be cast to type result_t . |
xtd::invalid_cast_exception | An element in the sequence cannot be cast to type `result_t`. |
#include <xtd/as>
is needeed to use this method.
|
static |
Splits the elements of a sequence into chunks of size at most size.
source_t | The type of the elements of source. |
source | A sequence of values to chunk. |
size | The maximum size of each chunk. |
size
is equal to 0.
|
inlinestaticnoexcept |
Concatenates two sequences.
source_t | The type of the elements of source. |
first | The first sequence to concatenate. |
second | The sequence to concatenate to the first sequence. |
|
inlinestaticnoexcept |
Determines whether a sequence contains a specified element by using the default equality comparer.
source_t | The type of the elements of source. |
source | A sequence in which to locate a value. |
value | The value to locate in the sequence. |
true
if the source sequence contains an element that has the specified value; otherwise, false
.
|
inlinestaticnoexcept |
Determines whether a sequence contains a specified element by using a specified equality comparer.
source_t | The type of the elements of source. |
source | A sequence in which to locate a value. |
value | The value to locate in the sequence. |
comparer | An equality comparer to compare values. |
true
if the source sequence contains an element that has the specified value; otherwise, false
.
|
inlinestaticnoexcept |
Returns the number of elements in a sequence.
source_t | The type of the elements of source. |
source | A sequence that contains elements to be counted. |
|
inlinestaticnoexcept |
Returns a number that represents how many elements in the specified sequence satisfy a condition.
source_t | The type of the elements of source. |
source | A sequence that contains elements to be tested and counted. |
predicate | A function to test each element for a condition. |
|
inlinestaticnoexcept |
Returns the number of elements with the specified value.
source_t | The type of the elements of source. |
source | A sequence that contains elements to be tested and counted. |
value | The value to search for. |
value
.
|
inlinestaticnoexcept |
Returns the count of elements in the source sequence grouped by key.
source_t | The type of the elements of source. |
key_t | The type of the key returned by key_selector . |
source | A sequence that contains elements to be counted. |
key_selector | A function to extract the key for each element. |
source
.
|
inlinestaticnoexcept |
Returns the count of elements in the source sequence grouped by key.
source_t | The type of the elements of source. |
key_t | The type of the key returned by key_selector . |
source | A sequence that contains elements to be counted. |
key_selector | A function to extract the key for each element. |
key_comparer | An equality comparer to compare keys. |
source
.
|
inlinestaticnoexcept |
Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.
source_t | The type of the elements of source. |
source | The sequence to return a default value for if it is empty. |
|
inlinestaticnoexcept |
Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.
source_t | The type of the elements of source. |
source | The sequence to return a default value for if it is empty. |
default_value | The value to return if the sequence is empty. |
|
inlinestaticnoexcept |
Returns the first element of the sequence that satisfies a condition, or a specified default value if no such element is found.
source_t | The type of the elements of source. |
source | A sequence of values to return an element from. |
predicate | A function to test each element for a condition. |
default_value | The default value to return if the sequence is empty. |
default_value
if source is empty or if no element passes the test specified by predicate; otherwise, the first element in source that passes the test specified by predicate.
|
inlinestaticnoexcept |
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
source_t | The type of the elements of source. |
source | A sequence of values to return an element from. |
predicate | A function to test each element for a condition. |
source_t {}
if source is empty or if no element passes the test specified by predicate; otherwise, the first element in source that passes the test specified by predicate.
|
inlinestaticnoexcept |
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
source_t | The type of the elements of source. |
source | A sequence of values to return an element from. |
default_value | The default value to return if the sequence is empty. |
default_value
if source is empty or if no element passes the test specified by predicate; otherwise, the first element in source that passes the test specified by predicate.
|
inlinestaticnoexcept |
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
source_t | The type of the elements of source. |
source | A sequence of values to return an element from. |
source_t {}
if source is empty or if no element passes the test specified by predicate; otherwise, the first element in source that passes the test specified by predicate.
|
inlinestatic |
Generates a sequence of integral numbers within a specified range.
count | The number of sequential integers to generate. |
xtd::argument_out_of_range_exception | `count` is less than 0. |
|
inlinestatic |
Generates a sequence of integral numbers within a specified range.
start | The value of the first integer in the sequence. |
count | The number of sequential integers to generate. |
xtd::argument_out_of_range_exception | `count` is less than 0. |
|
inlinestatic |
Generates a sequence of integral numbers within a specified range and step.
start | The value of the first integer in the sequence. |
count | The number of sequential integers to generate. |
step | The integer number specifying the incrementation. |
xtd::argument_out_of_range_exception | `count` is less than 0. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
source_t | The type of the elements of source. |
source | A sequence of values. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
source_t | The type of the elements of source. |
source | A sequence of values. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
collection_t | The type of the source. |
source | A sequence of values. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
input_iterator_t | The type of the source iterators. |
first | The first iterator. |
last | The last iterator. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
input_iterator_t | The type of the source iterators. |
iterator | The iterator. |
legnth | The le,gth to iterate. |
|
inlinestaticnoexcept |
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
source_t | The type of the source array. |
array | The native array. |
legnth | The length of the array. |
|
inlinestatic |
Projects each element of a sequence into a new form.
result_t | The type of the resulting value. |
source_t | The type of the elements of source. |
source | A sequence of values to invoke a transform function on. |
selector | A transform function to apply to each element. |
|
inlinestatic |
Projects each element of a sequence into a new form.
source_t | The type of the elements of source. |
source | A sequence of values to invoke a transform function on. |
selector | A transform function to apply to each element. |
|
inlinestatic |
Projects each element of a sequence into a new form by incorporating the element's index.
result_t | The type of the resulting value. |
source_t | The type of the elements of source. |
source | A sequence of values to invoke a transform function on. |
selector | A transform function to apply to each source element; the second parameter of the function represents the index of the source element. |
|
inlinestatic |
Projects each element of a sequence into a new form by incorporating the element's index.
source_t | The type of the elements of source. |
source | A sequence of values to invoke a transform function on. |
selector | A transform function to apply to each source element; the second parameter of the function represents the index of the source element. |
|
staticnoexcept |
Creates a xtd::collections::generic::list <type_t> from an xtd::collections::generic::ienumerable <type_t>.
source_t | The type of the elements of source. |
source | The xtd::collections::generic::ienumerable <type_t> to create a xtd::collections::generic::list <type_t> from. |
#include <xtd/collections/generic/lists>
is needeed to use this method.
|
inlinestatic |
Filters a sequence of values based on a predicate.
source_t | The type of the elements of source. |
source | A sequence of values to filter. |
predicate | A function to test each element for a condition. |
|
inlinestatic |
Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.
source_t | The type of the elements of source. |
source | A sequence of values to filter. |
predicate | A function to test each source element for a condition; the second parameter of the function represents the index of the source element. |