Package com.aspose.tasks
Class ListUtils
- java.lang.Object
-
- com.aspose.tasks.ListUtils
-
public class ListUtils extends Object
Utility class for list processing.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> void
apply(List<T> list, IAlgorithm<T> algorithm, int startIndex)
Apply algorithm for each list element starting from specified position.static <T> List<T>
filter(List<T> list, ICondition<T> cond)
Filter list elements by specified condition.static <T> T
find(List<T> list, ICondition<T> cond, Class clazz)
Find first occurrence of an list element which satisfy specified condition.
-
-
-
Method Detail
-
apply
public static <T> void apply(List<T> list, IAlgorithm<T> algorithm, int startIndex)
Apply algorithm for each list element starting from specified position.
- Parameters:
list
- List to process.algorithm
- Applied algorithm.startIndex
- Start element position.
-
filter
public static <T> List<T> filter(List<T> list, ICondition<T> cond)
Filter list elements by specified condition.
- Parameters:
list
- A list to process.cond
- Condition used to filter the specified list.- Returns:
- Filtered list.
-
find
public static <T> T find(List<T> list, ICondition<T> cond, Class clazz)
Find first occurrence of an list element which satisfy specified condition.
- Parameters:
list
- A list to process.cond
- Condition used to find an element in the specified list.clazz
- Class type of element T.- Returns:
- List element or null.
-
-