Package com.complexible.common.base
Class ProgressMonitor.DelegatingProgressMonitor
- java.lang.Object
-
- com.complexible.common.base.ProgressMonitor
-
- com.complexible.common.base.ProgressMonitor.DelegatingProgressMonitor
-
- All Implemented Interfaces:
Progress
,ProgressReporter
,java.lang.AutoCloseable
- Enclosing class:
- ProgressMonitor
public static class ProgressMonitor.DelegatingProgressMonitor extends ProgressMonitor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.complexible.common.base.ProgressMonitor
ProgressMonitor.Builder, ProgressMonitor.DefaultProgressFormatter, ProgressMonitor.DelegatingProgressMonitor, ProgressMonitor.ProgressFormatter, ProgressMonitor.ReportingProgressMonitor
-
Nested classes/interfaces inherited from interface com.complexible.common.base.Progress
Progress.Default
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
current()
Returns the current progress valuevoid
increment(long delta)
Increments the current progress by given delta and prints the progress if necessary.void
incrementMaxProgress(long theMaxProgress)
Increments the maximum progress value for this monitorlong
maxProgress()
Returns the maximum progress value for this monitorvoid
print()
Print the current progress, implementations may implement this as a no-opjava.lang.String
stage()
Returns the current stage of the process, or null if none.void
stage(java.lang.String stageName)
Set the name of current stage of the process.void
stop()
Stops the current progress monitor causing it to print a final message-
Methods inherited from class com.complexible.common.base.ProgressMonitor
builder, create, fixedIntervalMonitor, minimal, newBufferedMonitor, newMultiplyingMonitor, silent, tpsFormatter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.complexible.common.base.Progress
hasProgress
-
Methods inherited from interface com.complexible.common.base.ProgressReporter
close
-
-
-
-
Method Detail
-
increment
public void increment(long delta)
Description copied from interface:ProgressReporter
Increments the current progress by given delta and prints the progress if necessary.
-
maxProgress
public long maxProgress()
Description copied from interface:Progress
Returns the maximum progress value for this monitor
-
incrementMaxProgress
public void incrementMaxProgress(long theMaxProgress)
Description copied from interface:ProgressReporter
Increments the maximum progress value for this monitor
-
current
public long current()
Description copied from interface:Progress
Returns the current progress value
-
print
public void print()
Description copied from interface:ProgressReporter
Print the current progress, implementations may implement this as a no-op- Specified by:
print
in interfaceProgressReporter
- Specified by:
print
in classProgressMonitor
-
stop
public void stop()
Description copied from class:ProgressMonitor
Stops the current progress monitor causing it to print a final message- Specified by:
stop
in interfaceProgressReporter
- Specified by:
stop
in classProgressMonitor
-
stage
public java.lang.String stage()
Description copied from interface:Progress
Returns the current stage of the process, or null if none.
-
stage
public void stage(java.lang.String stageName)
Description copied from interface:ProgressReporter
Set the name of current stage of the process.
-
-