Aspose.Tasks for C++
Aspose::Tasks::Util::ListUtils Class Reference

Utility class for list processing. More...

#include <ListUtils.h>

Static Public Member Functions

template<typename T >
static void Apply (const System::SharedPtr< System::Collections::Generic::IList< T >> &list, const System::SharedPtr< IAlgorithm< T >> &algorithm, int32_t startIndex)
 Apply algorithm for each list element starting from specified position. More...
 
template<typename T >
static System::SharedPtr< System::Collections::Generic::IList< T > > Filter (const System::SharedPtr< System::Collections::Generic::IList< T >> &list, const System::SharedPtr< ICondition< T >> &cond)
 Filter list elements by specified condition. More...
 
template<typename T >
static T Find (const System::SharedPtr< System::Collections::Generic::IList< T >> &list, const System::SharedPtr< ICondition< T >> &cond)
 Find first occurrence of an list element which satisfy specified condition. More...
 

Detailed Description

Utility class for list processing.

Member Function Documentation

◆ Apply()

template<typename T >
static void Aspose::Tasks::Util::ListUtils::Apply ( const System::SharedPtr< System::Collections::Generic::IList< T >> &  list,
const System::SharedPtr< IAlgorithm< T >> &  algorithm,
int32_t  startIndex 
)
inlinestatic

Apply algorithm for each list element starting from specified position.

Parameters
listList to process.
algorithmApplied algorithm.
startIndexStart element position.
Template Parameters
TThe type of object to apply algorithm to.

◆ Filter()

template<typename T >
static System::SharedPtr<System::Collections::Generic::IList<T> > Aspose::Tasks::Util::ListUtils::Filter ( const System::SharedPtr< System::Collections::Generic::IList< T >> &  list,
const System::SharedPtr< ICondition< T >> &  cond 
)
inlinestatic

Filter list elements by specified condition.

Parameters
listA list to process.
condCondition used to filter the specified list.
Template Parameters
TThe type of object to apply filter to.
Returns
Filtered list.

◆ Find()

template<typename T >
static T Aspose::Tasks::Util::ListUtils::Find ( const System::SharedPtr< System::Collections::Generic::IList< T >> &  list,
const System::SharedPtr< ICondition< T >> &  cond 
)
inlinestatic

Find first occurrence of an list element which satisfy specified condition.

Parameters
listA list to process.
condCondition used to find an element in the specified list.
Template Parameters
TThe type of object to find.
Returns
List element or null.