public class TextProgressIndicator extends java.lang.Object implements ProgressIndicator
| Constructor and Description |
|---|
TextProgressIndicator(java.io.PrintStream out,
boolean profile)
Constructs a new indicator which will output to a given stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
endStage()
Indicates that no more
ProgressIndicator.setLevel(double) calls will be made until
the next ProgressIndicator.startStage(java.lang.String). |
void |
logMessage(java.lang.String msg)
Registers a comment about the progress of the algorithm.
|
void |
setLevel(double level)
Specifies that the work of the most recently-started stage is a certain
proportion complete.
|
void |
startStage(java.lang.String stage)
Indicates that a number of
ProgressIndicator.setLevel(double) calls may follow,
followed by a ProgressIndicator.endStage() call. |
public TextProgressIndicator(java.io.PrintStream out,
boolean profile)
out - output streamprofile - true iff profiling reports are to be made along with
the normal progress logpublic void startStage(java.lang.String stage)
ProgressIndicatorProgressIndicator.setLevel(double) calls may follow,
followed by a ProgressIndicator.endStage() call.startStage in interface ProgressIndicatorstage - name/description of the processing stagepublic void setLevel(double level)
ProgressIndicatorProgressIndicator.startStage(java.lang.String) and ProgressIndicator.endStage(),
preferably with non-decreasing values of level.
The method may throw an InterruptedException as a message to the caller that the work should be interrupted. A caller which receives such an exception should stop using resources and tidy up as soon as is convenient.
setLevel in interface ProgressIndicatorlevel - value between 0. and 1. indicating amount of completionpublic void endStage()
ProgressIndicatorProgressIndicator.setLevel(double) calls will be made until
the next ProgressIndicator.startStage(java.lang.String).endStage in interface ProgressIndicatorpublic void logMessage(java.lang.String msg)
ProgressIndicatorProgressIndicator.startStage(java.lang.String)
and ProgressIndicator.endStage().logMessage in interface ProgressIndicatormsg - messageCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.