|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.Progress
public class Progress
A progress object for a given overal number of items to process. The number of already processed items at a point in time can be updated. The main feature of this class is to provide a String representation of the progress suitable as a message for printing to the command line interface.
| Field Summary | |
|---|---|
private int |
processed
The number of items already processed at a time being. |
private String |
task
The task name. |
private int |
total
The overall number of items to process. |
private int |
totalLength
Holds the length of a String describing the total number. |
| Constructor Summary | |
|---|---|
Progress(String task,
int total)
A progress object for a given overal number of items to process. |
|
| Method Summary | |
|---|---|
String |
getTask()
Provides the name of the task. |
void |
setProcessed(int processed)
Sets the number of items already processed at a time being. |
int |
status()
Returns the progress status (percentage of progress). |
String |
toString()
Returns a String representation of the progress suitable as a message for printing to the command line interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final int total
private final int totalLength
private int processed
private String task
| Constructor Detail |
|---|
public Progress(String task,
int total)
task - the name of the tasktotal - the overall number of items to process| Method Detail |
|---|
public void setProcessed(int processed)
throws IllegalArgumentException
processed - the number of items already processed at a time being
IllegalArgumentException - if the given number is negative or exceeds the overall number of items to processpublic int status()
public String toString()
toString in class ObjectObject.toString()public String getTask()
|
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||