|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.utilities.AbstractProgressMonitor
sbrt.kernel.utilities.PercentProgressMonitor
public class PercentProgressMonitor
This class is used to monitor a process whose progress can be measured as a percentage.
Constructor Summary | |
---|---|
PercentProgressMonitor()
Constructs a new percentage-based progress monitor. |
|
PercentProgressMonitor(int total)
Constructs a new percentage-based progress monitor. |
Method Summary | |
---|---|
ProgressMonitor |
asUnmodifiable()
Returns this progress monitor as an immutable object. |
void |
complete()
Sets the internal counter equal to the provided total. |
java.lang.Double |
getProgress()
Returns a double precision number indicating the completed percentage of the process being monitored. |
void |
increment()
Causes this progress monitor to increment an internal counter. |
void |
resetCount()
Causes this progress monitor to reset it's internal counter to 0. |
void |
setTotal(int total)
Sets the total number of times increment() can be called. |
Methods inherited from class sbrt.kernel.utilities.AbstractProgressMonitor |
---|
getCount, getDuration, start, started, stop, stopped |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PercentProgressMonitor()
public PercentProgressMonitor(int total)
total
- the maximum number of calls allowed for increment()
.setTotal(int)
Method Detail |
---|
public void setTotal(int total)
increment()
can be called. This
is the value for which computed percentages are relative to.
total
- the total number of times increment()
can be called.public void resetCount()
resetCount
in interface MutableProgressMonitor
resetCount
in class AbstractProgressMonitor
increment()
,
AbstractProgressMonitor.getCount()
public void increment()
increment
in interface MutableProgressMonitor
increment
in class AbstractProgressMonitor
java.lang.IllegalStateException
- if this call causes the internal counter
to exceed the provided total.AbstractProgressMonitor.getCount()
public java.lang.Double getProgress()
public void complete()
getProgress()
will return 100.
public ProgressMonitor asUnmodifiable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |