edu.ucla.util
Class CompoundTask
Object
CompoundTask
- All Implemented Interfaces:
- ProgressMonitorable
public class CompoundTask
- extends Object
- implements ProgressMonitorable
A task that is the serial combination of two or more subtasks.
Supports weighting the sub-tasks in order to achieve a more
smooth, consistent overall pace in the reported progress.
For performance reasons, decomposes the sub-tasks into their
simplest possible constituents.
- Since:
- 20060519
- Author:
- keith cascio
CompoundTask
public CompoundTask(String descrip,
ProgressMonitorable[] tasks,
float[] weights)
- Parameters:
tasks
- These tasks are decomposed into their simplest possible constituents.
getDescription
public String getDescription()
- Specified by:
getDescription
in interface ProgressMonitorable
getProgress
public int getProgress()
- Specified by:
getProgress
in interface ProgressMonitorable
getProgressMax
public int getProgressMax()
- Specified by:
getProgressMax
in interface ProgressMonitorable
isFinished
public boolean isFinished()
- Specified by:
isFinished
in interface ProgressMonitorable
getNote
public String getNote()
- Specified by:
getNote
in interface ProgressMonitorable
decompose
public ProgressMonitorable[] decompose()
- Specified by:
decompose
in interface ProgressMonitorable
expand
public static float[] expand(float weight,
int length)
trivialDecomposition
public static final ProgressMonitorable[] trivialDecomposition(ProgressMonitorable task)
Copyright 2010 UCLA Automated Reasoning Group