public class SimpleAbsoluteProgressReporter extends SimpleProgressReporter implements AbsoluteProgressReporter
AbsoluteProgressReporter
interface,
which simply remembers that last values.SimpleProgressReporter
Modifier and Type | Field and Description |
---|---|
private long |
baseCompleted |
private long |
completed |
private String |
message |
private long |
total |
Constructor and Description |
---|
SimpleAbsoluteProgressReporter(ProgressReporter progress,
long total)
Create a new absolute progress reporter.
|
Modifier and Type | Method and Description |
---|---|
void |
displayAbsolute(long completed,
String message)
Display a progress message.
|
long |
getCompleted()
Get completed number of ticks of the task.
|
long |
getTotal()
Get the end point of the task.
|
void |
setAbsolute(long completed,
String message)
Set a basic progress level.
|
append, display, getMessage, getPercent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, display
private final long total
private long completed
private long baseCompleted
private String message
public SimpleAbsoluteProgressReporter(ProgressReporter progress, long total)
progress
- An optional progress which is also notified about
the progresstotal
- The end point of task, or -1 if not knownpublic void displayAbsolute(long completed, String message)
AbsoluteProgressReporter
displayAbsolute
in interface AbsoluteProgressReporter
completed
- The progress of the taskmessage
- A message, or nullpublic long getTotal()
public long getCompleted()
public void setAbsolute(long completed, String message)
displayAbsolute(long, String)
are based on the completed value and message set here.completed
- The basic completed progressmessage
- A default message