Package com.complexible.common.base
Interface ProgressReporter
-
- All Superinterfaces:
java.lang.AutoCloseable,Progress
- All Known Implementing Classes:
ProgressMonitor,ProgressMonitor.DelegatingProgressMonitor,ProgressMonitor.ReportingProgressMonitor
public interface ProgressReporter extends Progress, java.lang.AutoCloseable
Interface for progress reporting
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.complexible.common.base.Progress
Progress.Default
-
-
Field Summary
Fields Modifier and Type Field Description static ProgressReporterSILENT
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()voidincrement(long delta)Increments the current progress by given delta and prints the progress if necessary.voidincrementMaxProgress(long theMaxProgress)Increments the maximum progress value for this monitordefault voidprint()Print the current progress, implementations may implement this as a no-opvoidstage(java.lang.String stageName)Set the name of current stage of the process.voidstop()Stop the progress reporting.-
Methods inherited from interface com.complexible.common.base.Progress
current, hasProgress, maxProgress, stage
-
-
-
-
Field Detail
-
SILENT
static final ProgressReporter SILENT
-
-
Method Detail
-
increment
void increment(long delta)
Increments the current progress by given delta and prints the progress if necessary.
-
incrementMaxProgress
void incrementMaxProgress(long theMaxProgress)
Increments the maximum progress value for this monitor
-
stop
void stop()
Stop the progress reporting. Maybe print final number
-
close
default void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
stage
void stage(java.lang.String stageName)
Set the name of current stage of the process.
-
print
default void print()
Print the current progress, implementations may implement this as a no-op
-
-