edu.ucla.util
Class CompoundTask

Object
  extended by 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

Constructor Summary
CompoundTask(String descrip, ProgressMonitorable[] tasks, float[] weights)
           
 
Method Summary
 ProgressMonitorable[] decompose()
           
static float[] expand(float weight, int length)
           
 String getDescription()
           
 String getNote()
           
 int getProgress()
           
 int getProgressMax()
           
 boolean isFinished()
           
static ProgressMonitorable[] trivialDecomposition(ProgressMonitorable task)
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundTask

public CompoundTask(String descrip,
                    ProgressMonitorable[] tasks,
                    float[] weights)
Parameters:
tasks - These tasks are decomposed into their simplest possible constituents.
Method Detail

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