|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jmwe.util.NullProgressBar
public class NullProgressBar
Creates a progress bar that does nothing and prints nothing. Can be used when an implementation requires a progress bar but you have none to give it.
This class is a singleton. It may be subclassed, but not directly instantiated.
Constructor Summary | |
---|---|
protected |
NullProgressBar()
This constructor is marked protected so that this class may be subclassed, but not directly instantiated. |
Method Summary | |
---|---|
void |
finish()
Stops the progress bar and prints the total time that the progress bar ran. |
int |
getCount()
Returns the current state of the progress bar, that is, the number of units of progress that have been reported to it. |
Date |
getEndTime()
Returns the date and time on which this progress bar was finished. |
int |
getExpected()
Returns the expected number of units of progress. |
int |
getExpectedTicks()
Returns the expected number of ticks. |
static NullProgressBar |
getInstance()
Returns the singleton instance of this class, creating it if necessary. |
Date |
getStartTime()
Returns the date and time on which this progress bar was started. |
double |
getStepSize()
Returns the number of units of progress that are represented by one tick. |
int |
getTickCount()
Returns the number of current progress bar ticks that have been used. |
void |
increment()
Increments the progress bar by 1. |
void |
increment(int amount)
Increments the progress bar by a given amount. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected NullProgressBar()
Method Detail |
---|
public static NullProgressBar getInstance()
public int getCount()
IProgressBar
getCount
in interface IProgressBar
public int getTickCount()
IProgressBar
getTickCount
in interface IProgressBar
public int getExpected()
IProgressBar
getExpected
in interface IProgressBar
public int getExpectedTicks()
IProgressBar
getExpectedTicks
in interface IProgressBar
public double getStepSize()
IProgressBar
getStepSize
in interface IProgressBar
public Date getStartTime()
IProgressBar
getStartTime
in interface IProgressBar
public Date getEndTime()
IProgressBar
null
.
getEndTime
in interface IProgressBar
null
if not yet finished.public void increment()
IProgressBar
increment
in interface IProgressBar
public void increment(int amount)
IProgressBar
increment
in interface IProgressBar
amount
- amount by which the progress bar will be incrementedpublic void finish()
IProgressBar
finish
in interface IProgressBar
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |