edu.ucla.util
Class WeightedTask

Object
  extended by WeightedTask
All Implemented Interfaces:
ProgressMonitorable

public class WeightedTask
extends Object
implements ProgressMonitorable

Wrap a monitorable task such that the reported progress is multiplied by a weight factor. Useful to smooth out the reported pace of progress over the life of a compound task.

Since:
20060519
Author:
keith cascio

Constructor Summary
WeightedTask(ProgressMonitorable task, float weight)
           
 
Method Summary
 ProgressMonitorable[] decompose()
           
 String getDescription()
           
 String getNote()
           
 int getProgress()
           
 int getProgressMax()
           
 boolean isFinished()
           
 float weight()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeightedTask

public WeightedTask(ProgressMonitorable task,
                    float weight)
Method Detail

getDescription

public String getDescription()
Specified by:
getDescription in interface ProgressMonitorable

weight

public float weight()

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


Copyright 2010 UCLA Automated Reasoning Group