|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.utilities.AbstractProgressMonitor
public abstract class AbstractProgressMonitor
This abstract class is a skeleton implementation of ProgressMonitor. This class provided methods for counting events and measuring elapsed times.
Constructor Summary | |
---|---|
AbstractProgressMonitor()
Constructs a new progress monitor. |
Method Summary | |
---|---|
int |
getCount()
Returns the number of times of increment() has been called. |
long |
getDuration()
Returns the elapsed time between the calls of start() and
stop() . |
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 |
start()
Causes this progress monitor to start monitoring a duration of time. |
boolean |
started()
Indicates if this progress monitor has already been started. |
void |
stop()
Causes this progress monitor to stop monitoring a duration of time. |
boolean |
stopped()
Indicates if this progress monitor has already been stopped. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface sbrt.kernel.utilities.MutableProgressMonitor |
---|
asUnmodifiable |
Methods inherited from interface sbrt.kernel.utilities.ProgressMonitor |
---|
getProgress |
Constructor Detail |
---|
public AbstractProgressMonitor()
Method Detail |
---|
public int getCount()
increment()
has been called.
increment()
has been called.public void increment()
increment
in interface MutableProgressMonitor
getCount()
public void resetCount()
resetCount
in interface MutableProgressMonitor
increment()
,
getCount()
public void start()
start
in interface MutableProgressMonitor
java.lang.IllegalStateException
- if start()
was already called
without a subsequent call to stop()
.public void stop()
stop
in interface MutableProgressMonitor
java.lang.IllegalStateException
- if start()
was never called, or
if stop()
has already been called since the last call to
start()
.public boolean started()
started
in interface ProgressMonitor
true
if this progress monitor has already been started;
false
otherwise.public boolean stopped()
stopped
in interface ProgressMonitor
true
if this progress monitor has already been stopped;
false
otherwise.public long getDuration()
start()
and
stop()
. If start()
was never called, 0
is
returned.
If stop()
hasn't been called since the last call to
start()
, the elapsed time since the last call to start()
is returned.
getDuration
in interface ProgressMonitor
start()
and
stop()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |