com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class ListUtils



  • public class ListUtils
    extends Object

    Utility class for list processing.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static <T> void apply(com.aspose.ms.System.Collections.Generic.IGenericList<T> list, IAlgorithm<T> algorithm, int startIndex)
      Apply algorithm for each list element starting from specified position.
      static <T> com.aspose.ms.System.Collections.Generic.IGenericList<T> filter(com.aspose.ms.System.Collections.Generic.IGenericList<T> list, ICondition<T> cond)
      Filter list elements by specified condition.
      static <T> T find(com.aspose.ms.System.Collections.Generic.IGenericList<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(com.aspose.ms.System.Collections.Generic.IGenericList<T> list,
                                     IAlgorithm<T> algorithm,
                                     int startIndex)

        Apply algorithm for each list element starting from specified position.

        Type Parameters:
        T - The type of object to apply algorithm to.
        Parameters:
        list - List to process.
        algorithm - Applied algorithm.
        startIndex - Start element position.
      • filter

        public static <T> com.aspose.ms.System.Collections.Generic.IGenericList<T> filter(com.aspose.ms.System.Collections.Generic.IGenericList<T> list,
                                                                                          ICondition<T> cond)

        Filter list elements by specified condition.

        Type Parameters:
        T - The type of object to apply filter to.
        Parameters:
        list - A list to process.
        cond - Condition used to filter the specified list.
        Returns:
        Filtered list.
      • find

        public static <T> T find(com.aspose.ms.System.Collections.Generic.IGenericList<T> list,
                                 ICondition<T> cond,
                                 Class clazz)

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

        Type Parameters:
        T - The type of object to find.
        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.