Class ListUtils

Class ListUtils

Namespace: Aspose.Tasks.Util
Assembly: Aspose.Tasks.dll (25.2.0)

Utility class for list processing.

public static class ListUtils

Inheritance

objectListUtils

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods

Apply<t>(IList<t>, IAlgorithm<t>, int)

Apply algorithm for each list element starting from specified position.

public static void Apply<t>(IList<t> list, IAlgorithm<t> algorithm, int startIndex)

Parameters

list IList<t>

List to process.

algorithm IAlgorithm<t>

Applied algorithm.

startIndex int

Start element position.

Type Parameters

T

The type of object to apply algorithm to.

Filter<t>(IList<t>, ICondition<t>)

Filter list elements by specified condition.

public static IList<t> Filter<t>(IList<t> list, ICondition<t> cond)

Parameters

list IList<t>

A list to process.

cond ICondition<t>

Condition used to filter the specified list.

Returns

IList<t>

Filtered list.

Type Parameters

T

The type of object to apply filter to.

Find<t>(IList<t>, ICondition<t>)

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

public static T Find<t>(IList<t> list, ICondition<t> cond)

Parameters

list IList<t>

A list to process.

cond ICondition<t>

Condition used to find an element in the specified list.

Returns

T

List element or null.

Type Parameters

T

The type of object to find. </t></t></t></t></t></t></t></t></t></t></t></t></t></t></t></t>