
public class FiniteProgress extends AbstractProgress
| Modifier and Type | Field and Description |
|---|---|
private int |
total
The overall number of items to process.
|
private int |
totalLength
Holds the length of a String describing the total number.
|
| Constructor and Description |
|---|
FiniteProgress(String task,
int total)
Deprecated.
|
FiniteProgress(String task,
int total,
Logging logger)
Constructor with auto-reporting to logging.
|
| Modifier and Type | Method and Description |
|---|---|
StringBuilder |
appendToBuffer(StringBuilder buf)
Append a string representation of the progress to the given string buffer.
|
void |
ensureCompleted(Logging logger)
Ensure that the progress was completed, to make progress bars disappear
|
int |
getTotal()
Get the final value for the progress.
|
boolean |
isComplete()
Test whether the progress was completed.
|
void |
setProcessed(int processed)
Sets the number of items already processed at a time being.
|
getProcessed, getTask, incrementProcessed, incrementProcessed, setProcessed, testLoggingRate, toStringprivate final int total
private final int totalLength
@Deprecated public FiniteProgress(String task, int total)
task - the name of the tasktotal - the overall number of items to processpublic void setProcessed(int processed)
throws IllegalArgumentException
setProcessed in class AbstractProgressprocessed - the number of items already processed at a time beingIllegalArgumentException - if the given number is negative or exceeds
the overall number of items to processpublic StringBuilder appendToBuffer(StringBuilder buf)
appendToBuffer in interface ProgressappendToBuffer in class AbstractProgressbuf - Buffer to serialize topublic boolean isComplete()
public int getTotal()
public void ensureCompleted(Logging logger)
logger - Logger to report to.