public class NullProgressBar extends java.lang.Object implements IProgressBar
This class is a singleton. It may be subclassed, but not directly instantiated.
| Modifier | Constructor and Description |
|---|---|
protected |
NullProgressBar()
This constructor is marked protected so that this class may be
subclassed, but not directly instantiated.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.util.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.
|
java.util.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.
|
protected NullProgressBar()
public static NullProgressBar getInstance()
public int getCount()
IProgressBargetCount in interface IProgressBarpublic int getTickCount()
IProgressBargetTickCount in interface IProgressBarpublic int getExpected()
IProgressBargetExpected in interface IProgressBarpublic int getExpectedTicks()
IProgressBargetExpectedTicks in interface IProgressBarpublic double getStepSize()
IProgressBargetStepSize in interface IProgressBarpublic java.util.Date getStartTime()
IProgressBargetStartTime in interface IProgressBarpublic java.util.Date getEndTime()
IProgressBarnull.getEndTime in interface IProgressBarnull if not yet finished.public void increment()
IProgressBarincrement in interface IProgressBarpublic void increment(int amount)
IProgressBarincrement in interface IProgressBaramount - amount by which the progress bar will be incrementedpublic void finish()
IProgressBarfinish in interface IProgressBarCopyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.