Package com.aspose.tasks
Class TaskUtils
- java.lang.Object
-
- com.aspose.tasks.TaskUtils
-
public class TaskUtils extends Object
Helper class which provides useful operations with tasks.
-
-
Constructor Summary
Constructors Constructor Description TaskUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
apply(Task root, ITreeAlgorithm<Task> alg, int level)
Applies specified algorithm to each task of a tree.static Task
filter(Task root, ICondition<Task> cond)
Builds new tree of tasks which satisfy the condition.static Task
find(Task root, ICondition<Task> cond)
Finds a task which satisfy the condition in a tree of tasks.static int
taskChildrenCount(Task task)
Recursively calculates a number of task's children tasks through all levels.
-
-
-
Method Detail
-
apply
public static void apply(Task root, ITreeAlgorithm<Task> alg, int level)
Applies specified algorithm to each task of a tree.
- Parameters:
root
- Root of the treealg
- Applied algorithm.level
- Level of the root task.
-
filter
public static Task filter(Task root, ICondition<Task> cond)
Builds new tree of tasks which satisfy the condition.
- Parameters:
root
- Root of the tree.cond
- Applied condition.- Returns:
- Root of a new tree.
-
find
public static Task find(Task root, ICondition<Task> cond)
Finds a task which satisfy the condition in a tree of tasks.
- Parameters:
root
- Root of the tree.cond
- Applied condition.- Returns:
- Task if task was found, otherwise null.
-
taskChildrenCount
public static int taskChildrenCount(Task task)
Recursively calculates a number of task's children tasks through all levels.
- Parameters:
task
- The task which children calculate.- Returns:
- The number of children.
-
-