org.javaseis.util
Class Pacifier
java.lang.Object
org.javaseis.util.Pacifier
public class Pacifier
- extends java.lang.Object
Simple class to facilitate feedback to the user via a log file entry or by
updating a variable used maintian the percent completed.
Method Summary |
void |
init(long numElements_in)
|
static void |
main(java.lang.String[] args)
|
void |
update(long currentElement)
Looks at the progress and only calls the statusMsg callback if the progress meets the
specifications or the interval has been exceeded. |
void |
update(long currentElement,
java.lang.String comment)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Pacifier
public Pacifier(double percentIncrement_in,
double maxTimeIncrement_in,
PaciferCallback parent_in)
- Parameters:
percentIncrement_in
- amount of progress before the next update is createdmaxTimeIncrement_in
- max timeout to trigger an update if the increment hasn't been exceededparent_in
- callback interface
init
public void init(long numElements_in)
main
public static void main(java.lang.String[] args)
update
public void update(long currentElement)
- Looks at the progress and only calls the statusMsg callback if the progress meets the
specifications or the interval has been exceeded.
The callback for percentDone is called on every iteration. This usually sets a local
variable in the containing class that then can by querried via the exec/ui periodically
to display progress in the UI.
update
public void update(long currentElement,
java.lang.String comment)