|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.util.EstimatedProgressMeter
public class EstimatedProgressMeter
A progress meter to be used in situations where the total cannot be determined efficiently or conveniently up front. Instead, this progress meter will take an estimate for the total and never increment the progress past 99%, unless specifically told to.
Constructor Summary | |
---|---|
EstimatedProgressMeter(int estimatedTotal)
|
Method Summary | |
---|---|
void |
complete()
Sets the percent complete of this progress meter to 100%, regardless of where the progress is currently up to. |
int |
getCount()
|
int |
getEstimatedTotal()
|
int |
getPercentageComplete()
|
int |
incrementCount()
Increases the current count or progress by one. |
void |
setEstimatedTotal(int estimatedTotal)
Sets the estimatedTotal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EstimatedProgressMeter(int estimatedTotal)
estimatedTotal
- the estimated total
java.lang.IllegalArgumentException
- if estimatedTotal is less than zero.Method Detail |
---|
public int incrementCount()
public int getPercentageComplete()
public void complete()
public int getCount()
public int getEstimatedTotal()
public void setEstimatedTotal(int estimatedTotal)
estimatedTotal
- the estimated total
java.lang.IllegalArgumentException
- if estimatedTotal is less than zero.
java.lang.IllegalStateException
- if this is called after progress has started (that is, incrementCount()
has been called at least once)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |